matplotlib-pyodide
matplotlib-pyodide copied to clipboard
HTML5 backends for Matplotlib compatible with Pyodide
Does anyone know what the difference between wasm_backend vs. html5_canvas_backend? - The readme doesn't say - Google doesn't say anything - Nothing on stackoverflow. - None of old issues explain...
Check out this jsfiddle: https://jsfiddle.net/gh/get/library/pure/pyodide/pyodide-blog/contents/demos/canvas-renderer-matplotlib/demo-1/ It uses version v0.20.0 v0.21.3 will work. Starting with version 0.22, it stopped working The latest version, 0.25.1, doesn't work. You get error: ModuleNotFoundError: No...
Using this example that's linked from the official blog post: https://jsfiddle.net/gh/get/library/pure/pyodide/pyodide-blog/contents/demos/canvas-renderer-matplotlib/demo-1/ It tries and fails to get `https://fiddle.jshell.net/fonts/DejaVuSans.ttf`. I tried updating it to the lastest version by replacing the script...
updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/asottile/pyupgrade: v3.13.0 → v3.17.0](https://github.com/asottile/pyupgrade/compare/v3.13.0...v3.17.0) - [github.com/hadialqattan/pycln: v2.2.2 → v2.4.0](https://github.com/hadialqattan/pycln/compare/v2.2.2...v2.4.0) - [github.com/psf/black: 23.9.1 → 24.10.0](https://github.com/psf/black/compare/23.9.1...24.10.0) - [github.com/pycqa/flake8: 6.1.0 →...
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...
I attempted to use `document.pyodideMplTarget` to set a target element for a plot, and obtained this error message: ```Uncaught (in promise) PythonError: Traceback (most recent call last): File "", line...
I tried to make matplotlib responsive by doing this little trick ```python from js import window plt.rcParams['figure.figsize'] = [window.innerWidth*window.devicePixelRatio, 6] plt.rcParams["figure.dpi"] = window.devicePixelRatio ``` However, it does not work. Interestingly,...
## 🐛 Bug When use "module://matplotlib_pyodide.wasm_backend" to output pictures, each time it appends new divs and let the height of the page changes. That's unacceptable for admin apps. ### To...
Matplotlib removed maxdict: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.6.0.html#miscellaneous-internals I asked about this on the matplotlib discourse: https://discourse.matplotlib.org/t/matplotlib-pyodide-font-caching-with-maxdict-and-lru-cache/24260
## Problem Another community member and I were trying to see if Matplotlib's `animation.FuncAnimation` would work in PyScript using [this Matplotlib demo](https://matplotlib.org/stable/users/explain/animations/animations.html). We ran into the following error: ``` AttributeError:...