-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
API: Use scalings #4595
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
API: Use scalings #4595
Conversation
Unrelated, but where can I find the circle renderings for a build? |
"Details" of CircleCI on this page, sign in with GitHub, "Artifacts" tab |
Codecov Report
@@ Coverage Diff @@
## master #4595 +/- ##
==========================================
- Coverage 87.04% 87.02% -0.02%
==========================================
Files 349 349
Lines 66030 66073 +43
Branches 10251 10254 +3
==========================================
+ Hits 57476 57501 +25
- Misses 5661 5675 +14
- Partials 2893 2897 +4 |
LGTM any other reviewer? @dengemann @choldgraf @jasmainak ? |
ping also @kingjr as you opened the original issue |
scale : dict | float | None | ||
Scale the data for plotting. If None, defaults to 1e6 for eeg, 1e13 | ||
for grad and 1e15 for mag. | ||
scalings : dict | float | None |
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.
can scalings also be 'auto' here, or is that just for the raw plot?
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 think so, I think it's unique to raw
currently
for grad and 1e15 for mag. | ||
scalings : dict | float | None | ||
The scalings of the channel types to be applied for plotting. | ||
If None, defaults to ``dict(eeg=1e6, grad=1e13, mag=1e15)``. |
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.
don't we need to add a scale: ... DEPRECATED
bit in the docstring?
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.
No we usually don't list deprecated params
time_viewer.canvas.key_press_event('ctrl+right') | ||
time_viewer.canvas.key_press_event('left') | ||
time_viewer = fig.time_viewer | ||
_fake_click(time_viewer, time_viewer.axes[0], (0.5, 0.5)) # change t |
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.
lol did you do this just to avoid the pep monster?
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.
Yes :)
import matplotlib.pyplot as plt | ||
if show and matplotlib.get_backend() != 'agg': | ||
plt.show(**kwargs) | ||
(fig or plt).show(**kwargs) |
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.
wtf is this python voodoo...
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.
Python has a short-circuit functionality. So if fig
evaluates to True (in this case if it's a Figure
instead of the default None
) it will use it, otherwise it will use plt
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.
that is magical
a few small comments, but looks good. +1000 to API standardization |
thx @larsoner |
Closes #3702.
This PR:
scale
->scalings
plot_topo
that was necessary for tests to pass locally (and for interactivity to work for me at all), so I slightly modified two tutorials so that CircleCI would generate them.Ready for review/merge from my end.
(One of the last big blockers for 0.15!)