-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Scale points and labels in montage plot #12703
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
Conversation
cbrnr
left a comment
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.
BTW, ideally I'd want to change scaling_factor to just scale. Do you think this is worth it?
One problem with the current PR is that it's a pretty big change for people who used this previously. We do often change viz functions but it's usually fairly subtle, but in this case a One way out of this is to:
That stays 100% backward compatible but allows adding the new param and behavior with a better name. |
I would add:
|
|
The functions have the following signature: Where would you like me to insert the new |
68f4d21 to
45de3ed
Compare
|
So far we've been willing to insert could arguably benefit from having to updating their code to anyway because it's not at all obvious what the args are being used for in the first instance. (Whereas for something like the Epochs constructor you can reasonably do So I think I'm okay with having the |
agreed. |
45de3ed to
c00ab27
Compare
cbrnr
left a comment
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.
Done and ready for review.
larsoner
left a comment
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.
Looks good, thanks @cbrnr ! In principle we could add a test but I'm not sure it's worth it here.
* upstream/main: (252 commits) Disable the "Back to top" button in the documentation (mne-tools#12688) DOC: match_channel_orders works on Epochs and Evoked, too (mne-tools#12699) Scale points and labels in montage plot (mne-tools#12703) Add license header to mne.stats.erp (mne-tools#12712) Update license year to 2024 (mne-tools#12713) Add standardized measurement error (SME) (mne-tools#12707) ENH: Parallel example execution in doc build (mne-tools#12708) MAINT: Update PR template (mne-tools#12692) MAINT: Fix doc build (mne-tools#12706) [pre-commit.ci] pre-commit autoupdate (mne-tools#12702) Improve documentation of ylim argument through Evoked plotting function (mne-tools#12697) [pre-commit.ci] pre-commit autoupdate (mne-tools#12696) BUG: Fix bug with CSP rank="full" (mne-tools#12694) MRG: Add epochs metadata summary to HTML representation (mne-tools#12686) Correct `Epochs.apply_function` docstring (mne-tools#12691) FIX: Gracefully handle missing datetime in Eyelink File (mne-tools#12687) MAINT: Restore SciPy pre (mne-tools#12689) Enh single channel annotation (mne-tools#12669) [pre-commit.ci] pre-commit autoupdate (mne-tools#12682) Bump autofix-ci/action from 1.2 to 1.3 in the actions group (mne-tools#12681) ...






Previously, the
scale_factorargument only scaled the points inmontage.plot(). This PR changes the behavior to also scale the channel labels.In addition, I've changed the
scale_factorso that 1 corresponds to the default size, values less than 1 scale down, and values greater than 1 scale up. I've also decreased the default point size forkind="topo"a little bit.I've tested both
kind="topo"andkind="3d", I think they both look good.An alternative to scaling both dots and labels would be to keep the current behavior of
scale_factorand add a new parameterfont_size, which would allow users to change both properties independently.