danjgale / surfplot

A package for publication-ready brain surface figures
https://surfplot.readthedocs.io/en/latest/
Other
50 stars 13 forks source link

[WIP] Custom views #23

Closed danjgale closed 1 month ago

danjgale commented 1 year ago

Addresses #1, finally. Custom views are passed into the view parameter in Plot() as a 3-element tuple.

The first commit of this PR (91db9c33be54b4a4f81574f91a2939bf7b2d8fea) has a working version if only one view (a preset named view, like medial, or (x, y, z)). As of now this is still very much a work in progress, because passing in multiple views currently breaks.

danjgale commented 1 year ago

Now correctly handles multiple views without breaking. Locally tested different views and layouts. Combining custom and preset views (e.g., views=[(0, -50, -90), 'lateral']) seems to work for free out of the box. The only caveat with custom views is that sometimes extra zooming is required for certain views, but zoom can only be applied equally across all views. This is a limitation, but not a bug. If this is an issue, then it's currently advised to plot each view individually with zooms applied accordingly.

Not ready to merge yet. Will want to update tutorials and do some further testing so that I didn't add any breaking changes