Is there anyway I can create subplots using yasa.topoplot? #155
-
I am looking to plot a couple topoplots side-by-side (on one colorbar) but cannot figure out how to plot graphs in a subplot-style rather than many individual figures. Also, is there anyway I can remove the electrode labels without removing the text for the colorbar (right now I am doing fontsize=0, which also removes colorbar labels) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, Unfortunately YASA always create a new Figure (with only one axe): Line 478 in ae9ccc7 For more flexibility, I would recommend duplicating the code of yasa.topoplot and modify it e.g. in a Jupyter Notebook. If you disable the above figure creation, you should then be able to specify the axes directly to the https://mne.tools/dev/generated/mne.viz.plot_topomap.html, using Your second question is more of a matplotlib question I think. As of now however, the yasa topoplot temporarily modifies the global matplotlib fontsize parameters, which explains why it affects both the colorbar and the electrode labels. Again I'd recommend duplicating the function and removing this part of the code. You should then be able to specifiy different fontsizes for the colobar and main plot. Hope this helps, Thanks |
Beta Was this translation helpful? Give feedback.
Hi,
Unfortunately YASA always create a new Figure (with only one axe):
yasa/yasa/plotting.py
Line 478 in ae9ccc7
For more flexibility, I would recommend duplicating the code of yasa.topoplot and modify it e.g. in a Jupyter Notebook. If you disable the above figure creation, you should then be able to specify the axes directly to the https://mne.tools/dev/generated/mne.viz.plot_topomap.html, using
axes=
as a keyword argument to your custom topoplot function.Your second question is more of a matplotlib question I think. As of now however, the yasa topoplot temporarily modifies the global matplotlib fontsize parameters, whic…