-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[ENH] Add fig.mne container for colorbar #13019
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
It seems that Sphinx is not a big fan of private functions so changed the ref to mne_connectivity.viz.plot_connectivity_circle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to delay this PR as it's quite straightforward and effective... but we really ought to have a larger discussion/decision about how items in that namespace are organized (flat list or heirarchy) and how they are named. I don't want it to become an unstructured dumping ground for "anything the user might want access to after the figure is created". Since we're planning a release later this week, I'm tempted to delay merging this just a few days (until after the release), so the namespace doesn't become public until we've had a chance to put some guiderails on it. @larsoner WDYT?
Sounds reasonable to me! |
@@ -0,0 +1 @@ | |||
Add ``fig.mne`` container for :class:`Colorbar <matplotlib.colorbar.Colorbar>` in :func:`plot_connectivity_circle <mne_connectivity.viz.plot_connectivity_circle>` to allow users to access it directly, by `Santeri Ruuskanen`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI for future reference I think this would have been equivalent and shorter!
Add ``fig.mne`` container for :class:`Colorbar <matplotlib.colorbar.Colorbar>` in :func:`plot_connectivity_circle <mne_connectivity.viz.plot_connectivity_circle>` to allow users to access it directly, by `Santeri Ruuskanen`_. | |
Add ``fig.mne`` container for :class:`~matplotlib.colorbar.Colorbar` in :func:`plot_connectivity_circle <mne_connectivity.viz.plot_connectivity_circle>` to allow users to access it directly, by `Santeri Ruuskanen`_. |
Thanks @ruuskas |
Uggghhh forgot that we wanted this for 1.10 not 1.9. I'll revert quickly and then we'll bring it back in for 1.10 |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Back in |
This fixes Issue 262 in
mne_connectivity
.I added a
fig.mne
SimpleNamespace
, which holds theColorbar
for a circular plot. This allows users to directly access theColorbar
after creating a figure usingmne_connectivity.viz.plot_connectivity_circle
, which callsmne.viz.circle._plot_connectivity_circle
.I will add something in the docstring of
plot_connectivity_circle
to describe this functionality and modify one of the examples to use it.