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

Generating the same graph multiple times with new document.pyodideMplTarget objects cause every 2nd graph to disappear. #54

Open
coatless opened this issue Feb 21, 2024 · 1 comment

Comments

@coatless
Copy link

Under matplotlib_pyodide.html5_canvas_backend, I'm setting a new HTML object to document.pyodideMplTarget and, then, executing code to generate the plot. However, running the cell back-to-back seems to cause the graph to disappear on the second call and, then, reappear on the third call.

See the following GIF for an example:

mpl-backend-hiccup-on-repeat-plots

@KBurbank
Copy link

I had this issue as well. It can be avoided by putting "fig=plt.figure()" before creating the plot.

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