GEMDAT-repos / GEMDAT

Python toolkit for molecular dynamics analysis
https://gemdat.readthedocs.io
Apache License 2.0
21 stars 3 forks source link

Make backend for plots user configurable #319

Closed stefsmeets closed 1 month ago

stefsmeets commented 1 month ago

Since #313 we have almost all plots with both matplotlib and plotly. It would be nice if the user can select the backend for plotting when calling the plot functions.

orientations.plot_autocorrelation(backend='matplotlib')

or something like:

from gemdat import plots

plots.set.set_backend('matplotlib')
plots.displacement_histogram(...)  # -> matplotlib

plots.set.set_backend('plotly')
plots.displacement_histogram(...)  # -> plotly