When I use the example in the docs or readme, e.g.
import schemdraw
import schemdraw.elements as elm
with schemdraw.Drawing():
elm.Resistor().label('100KΩ')
elm.Capacitor().down().label('0.1μF', loc='bottom')
elm.Line().left()
elm.Ground()
elm.SourceV().up().label('10V')
I'm getting an empty image. Even when specifying a file, the resulting svg is empty.
This happens as a standalone python script (3.12.3) or inside a notebook (conda installation).
I figured out that I have to write:
import schemdraw
import schemdraw.elements as elm
with schemdraw.Drawing() as d:
d += elm.Resistor().label('100KΩ')
d += elm.Capacitor().down().label('0.1μF', loc='bottom')
d += elm.Line().left()
d += elm.Ground()
d += elm.SourceV().up().label('10V')
When I use the example in the docs or readme, e.g.
I'm getting an empty image. Even when specifying a file, the resulting svg is empty. This happens as a standalone python script (3.12.3) or inside a notebook (conda installation).
I figured out that I have to write:
in order to make it work.