Skip to content

Conversation

@drammock
Copy link
Member

@drammock drammock commented Apr 5, 2021

closes #9228

Note that I couldn't figure out how to test this when backend is Mayavi.

@drammock drammock changed the title expose cbar label param; update test expose colorbar label parameter in plot_sensors_connectivity Apr 5, 2021
@larsoner
Copy link
Member

larsoner commented Apr 5, 2021

Note that I couldn't figure out how to test this when backend is Mayavi.

We can hopefully trust our abstraction of the backends to take care of this. But in theory you should be able to get to it by going through the Mayavi traits-based internals. Generally these reflect the VTK classes but are Python-ized (snake instead of camel, remove vtk prefix, and using settrs and getters instead of functions), but I think it's okay not to do this here.

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM, maybe a quick latest.inc update would be good?

@drammock
Copy link
Member Author

drammock commented Apr 5, 2021

in theory you should be able to get to it by going through the Mayavi traits-based internals.

In theory maybe, but not in practice. I tried for about 15 minutes to find the object-based accessor for the scalar bar. Eventually resorting to the mayavi scene recording feature and click-dragging the bar yielded something like mlab_interface.children[18].children[0].children[0].children[0].scalar_bar_interactor... (reproducing from memory, I'm sure that's inaccurate) which I wasn't about to put into a test.

drammock and others added 2 commits April 5, 2021 12:06
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
drammock and others added 2 commits April 5, 2021 13:23
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
@drammock
Copy link
Member Author

drammock commented Apr 5, 2021

all green, in it goes!

@drammock drammock merged commit 2bfac65 into mne-tools:main Apr 5, 2021
@drammock drammock deleted the fix-spectral-conn-title branch April 5, 2021 21:16
vagechirkov pushed a commit to vagechirkov/mne-python that referenced this pull request Apr 6, 2021
…ls#9248)

* expose cbar label param; update test

* update changelog

* Update mne/viz/_3d.py

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>

* fix error message grammar

* Update mne/viz/tests/test_3d.py

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image title of spectral connectivity

2 participants