Have you seen Skulpt [1]? It doesn’t do matplotlib (or most other library) but it’s pure JS.
[1]: https://skulpt.org/
[1]: https://skulpt.org/
[1]: https://github.com/blockpy-edu/skulpt/blob/master/src/lib/ma...
it would be really great if we could have full python/pip support in the browser but with some vetting done (just realized we don't have such thing in pip, other than relying on pip lockfiles and pipenv)