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

Why does the draw_matplotlib function close the figure before returning it? #276

Open
mehatamm opened this issue Nov 13, 2024 · 1 comment

Comments

@mehatamm
Copy link
Contributor

It seems that the draw_matplotlib function in pyzx/drawing.py used to plt.show(), but was changed to plt.close() and then returns the figure. To then visualize the figure, it is necessary to create a dummy figure and then move the returned figure to its manager, but this breaks interactivity on my backend (MacOSX). Is there any particular reason why the figure is closed before returning?

@jvdwetering
Copy link
Collaborator

I am not sure why this there to be honest. My guess is that it was causing weird behaviour on certain platforms. I guess there could be an optional parameter to disable this behaviour.

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

No branches or pull requests

2 participants