Python 3.8, Spyder IDE
I installed Schemdraw using,
pip install schemdraw[matplotlib]
I'm using the following code but all I get is a blank canvas,
import schemdraw
import schemdraw.elements as elm
from schemdraw import logic
from schemdraw.parsing import logicparse
with schemdraw.Drawing() as d:
logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
Also tried,
with schemdraw.Drawing() as d:
d = logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
d.draw()
Gives a blank canvas.
Also tried,
with schemdraw.Drawing() as d:
d.add(logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$'))
Also tried,
d = logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
d.draw()
Returns nothing not even a blank canvas.
This throws the following error,
Traceback (most recent call last):
File "D:\Python codes\temp.py", line 10, in <module>
d.add(logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$'))
File "D:\ProgramData\Anaconda3\lib\site-packages\schemdraw\schemdraw.py", line 233, in add
element = element(**kwargs)
TypeError: 'Drawing' object is not callable
I have also tried (after the imports) just,
logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
which gives no output at all. I have the lastest version of pyparse
installed.
Whereas the following simple circuit works fine,
with schemdraw.Drawing() as d:
d.add(elm.Resistor())
d.add(elm.Capacitor())
d.add(elm.Diode())
Is there something obvious missing here?