Skip to content

Add plotly-based surface plotter (to dev) - #6

Open
VictorBarnes wants to merge 6 commits into
NSBLab:devfrom
VictorBarnes:feature/new-plotter
Open

Add plotly-based surface plotter (to dev)#6
VictorBarnes wants to merge 6 commits into
NSBLab:devfrom
VictorBarnes:feature/new-plotter

Conversation

@VictorBarnes

Copy link
Copy Markdown

pyproject.toml

  • I added a few necessary python libraries to a new plotting optional dependency: kaleido is for converting a plotly figure to a static image and nbformat is for rendering plotly figures in notebooks.

plotting.py

  • Renamed surfplot-based plotter from plot_surf to plot_surf_surfplot
  • Added plotly-based plotter as plot_surf and helper function plot_surf_single.
  • I have left a bunch of #TODOs around for suggested enhancements but just wanted to get a basic working version for now.
  • I added some helper functions (fetch_trace and update_trace_type) for modifying a plotly figure after it has been generated. These are related to the #TODO on line 211 in plotting.py where we need to decide whether to name each trace such that they can be easily modified post figure generation.
  • compute_roi_outlines is my initial attempt to solve the #TODO on line 263 in plotting.py but I didn't include it in plot_surf yet because I haven't tested it enough.

Tutorials

  • Added plot_surf_single_hemi.ipynb and plot_surf_multi_hemi.ipynb to showcase plot_surf. I had to split these over multiple notebooks because having them all in one file exceeded git's max file size (100 MB). I also cleared the outputs before I committed so you'll have to re-run the notebooks to see the plots.

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.

1 participant