-
Notifications
You must be signed in to change notification settings - Fork 10
Create interactive matplotlib gallery #10
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
Comments
One possibility could be to integrate with sphinx-gallery (cf this example gallery, for instance). A number of projects are using it and it currently allows to export a Jupyter notebook (or launch it in Binder). Adding another button with the Iodide notebook, might be useful. Though the issue is that it often in project CIs, so it means that the CI would also have to build the pyodide package for the project in question. If we provide a docker image with pyodide, that might simplify things, but I still wonder if this is the right use case... |
There is some work afoot to make the Jupyter / Binder buttons configurable, so adding pyodide support would be as simple as adding an option to the sphinx conf.py I don't think there would need to be a docker image -- it could just link to the pyodide served at |
I don't think the docker approach is necessary -- we just need to serve a prebuilt pyodide somewhere (which we already do). This probably will require coordination with the sphinx-gallery and matplotlib projects. The sphinx-gallery would need to be updated to provide "run in pyodide" as one of the options for the bottom of each example page (or a generic way to add additional links there). For an example, look at the bottom of this page. There are two buttons there generated by sphinx-gallery -- we want to add a third. Then we'd need to coordinate with matplotlib to update to that new version / configuration of sphinx-gallery. Thanks for offering to take this on, but just a heads up: large parts of this are community cat herding, more than coding... :) |
Just saw this issue come up on Gitter ...
As a maintainer of sphinx-gallery I'm sure we could figure out an API. We have opt-in support for optional Binder integration, adding another opt-in integration would be fine. To really make it general, we could easily (at our end) add something like:
where you can have
FWIW I added animations support to sphinx-gallery and it was fairly easy to then get it added to matplotlib. Adding pyodide seems like a bigger step, though, so someone might want to check to see if matplotlib folks are on board before putting too much work into it. |
It should be possible to use this thing to put together an interactive matplotlib gallery.
The text was updated successfully, but these errors were encountered: