Allow subclasses of FigureClass to be passed to plot_raw/plot_epochs#13979
Allow subclasses of FigureClass to be passed to plot_raw/plot_epochs#13979frankier wants to merge 1 commit into
Conversation
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
larsoner
left a comment
There was a problem hiding this comment.
Docs should probably also mention that this param only affects the matplotlib plotting backend.
Do you think it's worth adding some version of this to an advanced raw viz example?
df13f3b to
d5e8ef6
Compare
* Allow subclasses of `MNEBrowseFigure` to be passed to plot_raw/plot_epochs, as well as the corresponding `plot(...)` methods of the raw and epochs classes. * Add an example showing onionskinning of MEG traces
d5e8ef6 to
98ab4b3
Compare
|
Okay I've tried to address all of these and added an example |
larsoner
left a comment
There was a problem hiding this comment.
Can you see if you can get pytest mne/tests/test_docstring_parameters.py to pass locally? CIs are still unhappy with the ordering
| @@ -0,0 +1 @@ | |||
| Allow subclasses of `MNEBrowseFigure` to be passed to plot_raw/plot_epochs, as well as the corresponding `plot(...)` methods of the raw and epochs classes, by :newcontrib:`Frankie Robertson` | |||
There was a problem hiding this comment.
single backtick is default linking mode (which for us is :py:obj: I think), if not adding to public API need code mode
| Allow subclasses of `MNEBrowseFigure` to be passed to plot_raw/plot_epochs, as well as the corresponding `plot(...)` methods of the raw and epochs classes, by :newcontrib:`Frankie Robertson` | |
| Allow subclasses of ``MNEBrowseFigure`` to be passed to plot_raw/plot_epochs, as well as the corresponding `plot(...)` methods of the raw and epochs classes, by :newcontrib:`Frankie Robertson` |
| and if absent, falls back to ``'estimated'``. | ||
| """ | ||
|
|
||
| docdict["figure_class"] = """ |
There was a problem hiding this comment.
This is probably failing due to
>>> "_" < "u"
True
so needs to move down two more entries
| This example is "bad code" in a few ways: | ||
| * Since the interface for MNEBrowseFigure is not public, it is liable to |
There was a problem hiding this comment.
This currently renders as a definition list, which I don't think is what you meant? If supposed to just be bullets then
| This example is "bad code" in a few ways: | |
| * Since the interface for MNEBrowseFigure is not public, it is liable to | |
| This example is "bad code" in a few ways: | |
| * Since the interface for MNEBrowseFigure is not public, it is liable to |
and fix other * to be not indented
| @@ -0,0 +1,149 @@ | |||
| """ | |||
| .. _ex-arrowmap: | |||
There was a problem hiding this comment.
Wrong label, you can just remove it unless you specifically want to link to it in the docs
| .. _ex-arrowmap: | ||
|
|
||
| ============================================================== | ||
| Advanced plotting customization by subclassing MNEBrowseFigure |
There was a problem hiding this comment.

What does this implement/fix?
This change allows for customization of raw/epoch plots via passing in a subclass of MNEBrowseFigure.
Currently I have achieved this in my own code through monkeypatching. This PR is the first steps towards cleaning things up to make extensions cleaner.