You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some matplotlib environments ignore this silently, but in others this causes an error. For example, this fails also in the latest version of pandas (see this issue and this Stack Overflow answer).
But I think this might result in a slightly different appearance in some environments, as the axes are computed rather than explicitly set. Were the original values [0, 0, 1, 1] explicitly chosen to force a particular appearance? Otherwise, it seems it's likely more robust to let them be computed based on the environment.
The text was updated successfully, but these errors were encountered:
If I explicitly call ax.set(xlim=(0, 1), ylim=(0, 1)), that fixes the issue with the label being cut off. This must've been the original reason for forcing those axes. I'll send a fix.
I am embedding a ZX diagram into a web app (using shiny), and calling
pyzx.draw(g)
results in an error'NoneType' object has no attribute 'rowspan'
.The cause is due to the way that PyZX is creating the figure in these lines, which does not set
matplotlib.gridspec.SubplotSpec
properly.Some matplotlib environments ignore this silently, but in others this causes an error. For example, this fails also in the latest version of pandas (see this issue and this Stack Overflow answer).
This can be fixed by calling
subplots
instead:But I think this might result in a slightly different appearance in some environments, as the axes are computed rather than explicitly set. Were the original values
[0, 0, 1, 1]
explicitly chosen to force a particular appearance? Otherwise, it seems it's likely more robust to let them be computed based on the environment.The text was updated successfully, but these errors were encountered: