matplotlib-pyodide
matplotlib-pyodide copied to clipboard
Generating the same graph multiple times with new `document.pyodideMplTarget` objects cause every 2nd graph to disappear.
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:
I had this issue as well. It can be avoided by putting "fig=plt.figure()" before creating the plot.