Skip to content
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

Add option to switch between plotting backends #326

Merged
merged 5 commits into from
Jun 5, 2024
Merged

Add option to switch between plotting backends #326

merged 5 commits into from
Jun 5, 2024

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Jun 5, 2024

This PR adds a user option to choose the backend for plotting.

The implementation is based on a decorator that strips the backend from the argument list and passes the plotting module (plots.matplotlib or plots.plotly) to the plotting method.

trajectory.plot_displacement_per_atom()  # default backend
trajectory.plot_displacement_per_atom(backend='matplotlib')
trajectory.plot_displacement_per_atom(backend='plotly')

Closes #319

Todo

  • Update tests to make use of the decorator

@stefsmeets stefsmeets marked this pull request as ready for review June 5, 2024 09:32
@stefsmeets stefsmeets merged commit f18ae50 into main Jun 5, 2024
6 checks passed
@stefsmeets stefsmeets deleted the backend branch June 5, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make backend for plots user configurable
1 participant