ContextLab / hypertools

A Python toolbox for gaining geometric insights into high-dimensional data
http://hypertools.readthedocs.io/en/latest/
MIT License
1.81k stars 161 forks source link

full control over plotting backend, non-animated interactive plots, and plotting-related bug fixes #245

Closed paxtonfitzpatrick closed 3 years ago

paxtonfitzpatrick commented 3 years ago

New features

Create animated plots in an environment with a non-interactive matplotlib plotting backend set, without disrupting the global plotting backend

hypertools1

Create non-animated, interactive plots for easy inspection of data using the new interactive keyword argument

hypertools2

Set the plotting backend for a single plot using the new mpl_backend keyword argument, and easily switch between backends within a single Python interpreter session, IPython kernel, and even Jupyter notebook cell

hypertools3

Use the new hypertools.set_interactive_backend function to change the backend for all future plots, or use it as a context manager to temporarily switch to a different backend. You can also use this to create multiple animated/interactive plots simultaneously!

hypertools4

You can even use hypertools's backend adjustments to control other plotting libraries

hypertools5

Set the $HYPERTOOLS_BACKEND environment variable to permanently set your preferred plotting backend

(currently applies to use in Python scripts only; the backend in a Jupyter notebook will always default to nbAgg, aka notebook)

Currently supported backends include TkInter, GTK, wxPython, Qt 4, Qt 5, Cocoa (aka MacOSX; MacOS only), notebook/nbAgg (Jupyter notebooks only), and ipympl/widget (Jupyter notebooks only)

Bug fixes

jeremymanning commented 3 years ago

Awesome! Looking forward to reviewing this-- likely on Friday. 🎉