[Mne_analysis] Inhibit figure plot

Dan McCloy dan at mccloy.info
Mon Feb 8 17:11:35 EST 2021
Search archives:

        External Email - Use Caution        

Can you report your MNE-Python version info? For me the following works correctly (no plot windows are opened):

import mne
import matplotlib.pyplot as plt
# do whatever needed to create your epochs, and then:
for ch in epochs.ch_names:
fig = epochs.plot_image(picks=ch, show=False)[0]

-- dan
Daniel McCloy
Research Scientist
Institute for Learning and Brain Sciences
University of Washington

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, February 3, 2021 6:05 PM, Bruno Mansur <brunommansur at gmail.com> wrote:

> External Email - Use Caution
> Dear MNE list members,
> I have a script that generates several plots and it slows down the code execution speed:
> for ch in evoked_OGT.ch_names:
> fig = epochs_OGT.plot_image(picks=ch, title=ch+' '+'OGT', show=False)
> plt.savefig('/home//Evoked_OGT_%s.png'%(ch), show=False)
> Although I set 'show=false', the function 'plot_image' keeps opening new windows with figure plots. The output is not showing up in the console, but really opening new windows that I have to be closed every time I run the code.
> I'm using QT5 as a graphics backend option.
> Is there a way to stop mne functions from opening new windows?
> I would appreciate any help,
> Best regards,
> Bruno Mansur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210208/d668a4ff/attachment.html 

More information about the Mne_analysis mailing list