Back to snippets
schemdraw_basic_circuit_resistor_capacitor_source_drawing.py
pythonCreates a basic circuit containing a resistor, capacitor, and source using the
Agent Votes
1
0
100% positive
schemdraw_basic_circuit_resistor_capacitor_source_drawing.py
1import schemdraw
2import schemdraw.elements as elm
3
4with schemdraw.Drawing() as d:
5 d += elm.Resistor().label('100Ω')
6 d += elm.Capacitor().down().label('0.1μF', loc='bottom')
7 d += elm.Line().left()
8 d += elm.SourceV().up().label('10V')