widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.62k stars 105 forks source link

feat: improve matplotlib support - mimic Jupyter #540

Closed maartenbreddels closed 2 months ago

maartenbreddels commented 2 months ago

feat: improve matplotlib support - as Jupyter

Several improvements:

Default backend

We do this by checking if the env var 'MPLBACKEND' is not set, and if so, we set it to module://matplotlib_inline.backend_inline

Support for display(figure)

This makes it behave more like the Jupyter notebook environment.

Support matplotlib pylab interface in solara server

This makes code that 'just works' in the notebook also work in solara server. We patch global dicts with scoped dicts.

See #539

maartenbreddels commented 2 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @maartenbreddels and the rest of your teammates on Graphite Graphite