Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pyzx.draw() causing an error due to missing subplotspec in some matplotlib environments. #223

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

dlyongemallo
Copy link
Contributor

Fixes #222.

@dlyongemallo
Copy link
Contributor Author

Code review note: This PR should be tested by a variety of users in different environments to ensure the appearance of the diagrams are the same as before. I've manually tested it in different environments on my own machine, and in theory I've set everything which had previously been explicitly set to their existing values, but the call to subplots is now setting the matplotlib.gridspec.SubplotSpec which was previously not set before and could therefore potentially change the figures' appearance in some environments.

@dlyongemallo
Copy link
Contributor Author

Has anyone had a chance to look at this? I'm pretty sure this fixes the issue in those environments for which missing subplotspec causes a problem, and is a no-op otherwise.

@RazinShaikh
Copy link
Contributor

I tried this and the figures look same to me.

@dlyongemallo
Copy link
Contributor Author

Can this be merged please?

@jvdwetering jvdwetering merged commit 7c1ee73 into zxcalc:master Jun 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pyzx.draw() does not work in some matplotlib environments
3 participants