-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG: refactor plot_epochs_image and plot_compare_evokeds #6422
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
MRG: refactor plot_epochs_image and plot_compare_evokeds #6422
Conversation
3a76da3 to
af19ee6
Compare
Codecov Report
@@ Coverage Diff @@
## master #6422 +/- ##
==========================================
+ Coverage 89.33% 89.41% +0.07%
==========================================
Files 416 416
Lines 74865 74839 -26
Branches 12341 12312 -29
==========================================
+ Hits 66883 66914 +31
+ Misses 5139 5112 -27
+ Partials 2843 2813 -30 |
|
This pull request introduces 3 alerts when merging af19ee6 into e1a160c - view on LGTM.com new alerts:
|
af19ee6 to
b961a44
Compare
|
It will take me a while to go through this, but thanks for taking my bad code and making it better! |
|
This pull request introduces 1 alert when merging e3c4316 into a2c7590 - view on LGTM.com new alerts:
|
e3c4316 to
326ec37
Compare
|
This pull request introduces 1 alert when merging 389c5da into b07a871 - view on LGTM.com new alerts:
|
|
I'm pretty happy with where @agramfort I removed the parts of |
|
epochs.plot_image(picks='mag', combine='std')
looks wrong. Colorbar should be Reds and I don't understand why the
line plot below can be negative
besides plots LGTM. I'll look at the code later. Great job !
|
fdbba0c to
246af15
Compare
|
I've now overhauled There are still some TODOS:
Notable changes:
|
4f6d32c to
9c04fca
Compare
|
Strongly appreciate what you're doing @drammock ! |
|
Can you cover split_legend in the gist? |
|
@jona-sassenhagen the gist is updated but GitHub isn't rendering it so here's an nbviewer link |
34e7616 to
d5fd61c
Compare
|
@jona-sassenhagen @agramfort tests are passing locally, so hopefully CIs do to; I think this is ready for code review. I've updated the gist with some additional tests of $ git diff master --stat
9 files changed, 1210 insertions(+), 1350 deletions(-)140 lines net negative! woohoo! NOTE: there is one |
|
@drammock can you see why CIs complain? do you have a new rendered notebook? thanks heaps |
|
@agramfort almost all tests pass; the remaining failure is one of the Remaining TODOs are at least:
This should probably get at least two fairly thorough reviewers given how extensive the changes are. |
|
reviewed gist. It looks good !
tests pass for me too...
|
|
Looks great so far!!! Can you cover one more case? |
|
@jona-sassenhagen the way the code is now, cells 30 and 31 of the gist will not change if you add |
|
Ah sure. Sorry. The case I meant was: let’s say you have 8 items and 4 colors and 2 linestyles. So you might have dark blue dotted, dark blue straight. Light blue dotted, light blue straight. Light red dotted, light red straight. Etc. And the legend would only indicate linestyle, the colorbar the color. Does that make sense? |
1ac2ea7 to
dc158d6
Compare
|
here's the updated Gist and an nbviewer link since GitHub is sometimes not rendering the gist. Other than a |
|
Only 1 remaining CI error is unrelated: |
|
Restarted the broken build and it passed, all green. @jona-sassenhagen feel free to merge if you're happy (enough) and we can iterate more in subsequent PRs |
|
Thanks a lot @drammock !!! |
Closes #6329
epochs.plot_image()(works, one fig of GFP for each channel type)epochs.plot_image(picks=<ch_type>)(works, one fig of GFP)epochs.plot_image(picks=<ch_type>, combine='mean')(works)epochs.plot_image(picks=<ch_name>)(works)epochs.plot_image(picks=<ch_name>, combine='mean')(works, but warns)epochs.plot_image(picks=<list_of_ch_names>)(works, one fig per channel)epochs.plot_image(picks=<list_of_ch_names>, combine='mean')(works, one fig)These are certainly not all the relevant test cases yet, feel free to add some. Some other TODOs: