-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG, ENH: Support n_col keyword in ica.plot_score #7825
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
Merged
Merged
+63
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
@larsoner or @dengemann could either of you take a look at the commented out test? I'm not sure what it was trying to test. |
agramfort
reviewed
May 26, 2020
Contributor
Author
|
I just pushed a change to the function that
1) Lets the test pass
2) Does what I think was expected before
I'm good to MRG on my end if everyone is happy.
…On Tue, May 26, 2020 at 10:52 AM Eric Larson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In mne/viz/tests/test_ica.py
<#7825 (comment)>:
> ica.plot_scores([0.3, 0.2], axhline=[0.1, -0.1], labels='foo')
ica.plot_scores([0.3, 0.2], axhline=[0.1, -0.1], labels='eog')
- ica.plot_scores([0.3, 0.2], axhline=[0.1, -0.1], labels='ecg')
+ # ica.plot_scores([0.3, 0.2], axhline=[0.1, -0.1], labels='ecg')
one solution would be to first look for nested labels ('ecg/') and if none
are found look for non-nested ('ecg')
I have no idea if the labeling is supposed to work this way, it would
require digging into the code...
Maybe just add:
ica.labels_['ecg/0/bar'] = 1
? This should allow it to plot
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7825 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKTXHKQRU4WSDF2S75KBZLRTPJT5ANCNFSM4NJVPC2Q>
.
|
larsoner
reviewed
May 26, 2020
Member
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.
Just a minor nitpick/idea, then +1 for merge from me!
larsoner
reviewed
May 26, 2020
Member
|
Thanks for working to appease codecov :) |
larsoner
approved these changes
May 27, 2020
Member
|
Thx @bloyl |
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
May 28, 2020
* upstream/master: MRG: Add support for foreground in _Brain (mne-tools#7843) MRG, MAINT: Change default role in conf.py (mne-tools#7841) MRG, ENH: Support n_col keyword in ica.plot_score (mne-tools#7825) add icons to source dist (mne-tools#7840) Add CZI to list of funders (mne-tools#7839) DOC: added reference to sesameeg package (mne-tools#7835) MRG, ENH: Automatically compute threshold for CTPS ECG detection (mne-tools#7819) MAINT: Show how picks work for planars (mne-tools#7833) Clearer info docstring (mne-tools#7832) MRG, ENH: Add estimation method legend (mne-tools#7830) Remove double spaces (mne-tools#7822) add troubleshooting message about OpenGL [skip travis] (mne-tools#7827) fix links [skip travis] (mne-tools#7826)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In playing with the recent ica ref channels artifact rejection (#7810), I'd sometimes have 4-5 score plots in one column, which I couldn't see.
This PR adds a parameter ('n_col') to 'ica_plot_scores' to use a grid with multiple columns.
There is a question about the following from the test.
ica.plot_scores([0.3, 0.2], axhline=[0.1, -0.1], labels='ecg')it fails on this PR and is currently commented out.
On master it passed but did not make a plot, because:
returned
labels = []and nothing was plotted.I don't know enough about the ica labeling so someone should advice what the correct behavior is and how to test it.