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

Adding Plotly's interactive features to BeamAnalysis #98

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

waynemaranga
Copy link

Proposing to add more interactive features in notebooks using Plotly, the first one being BeamAnalysis.plot_interactive_results() that plots a simple interactive plot using Plotly with minimal difference from the plot_results() using Pyplot. The key differences have been commented in, but the basic functionality is the same: it plots a Figure.

This change introduces a new dependency: plotly

Future interactive features based on this:

  1. Using Click Events in Jupyter https://plotly.com/python/click-events/#update-points-using-a-click-callback
  2. Animating Influence Lines https://plotly.com/python/animations/#animated-figures-in-dash
  3. A fully fledged frontend using Dash

@ccaprani
Copy link
Owner

Hi @waynemaranga ! Thanks indeed for this great idea. I'm thinking that it might be best to have plotly as an optional dependency for users that want the interactive plotting. Users that don't want it, don't then need plotly. What do you think?

To have it as an optional depedency, pyproject.toml will need to be updated like this, and the code will need to check for the presence or non-presence of plotly, like this.

@waynemaranga
Copy link
Author

waynemaranga commented Jul 19, 2024

I think that's great. That can be extended by making the interactive plotting and animation features of the library as an optional feature as well, along with the dependency. 👍🏾 Will update the PR with this once all tests are passing.

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.

None yet

2 participants