<div dir="ltr"><div class="gmail_extra">Great! The bug with the <span style="font-family:courier new,monospace">show</span> parameter is now fixed. With the development version, you should be able to simply do <br><br><span style="font-family:courier new,monospace"><span style="font-size:13px">fig = ica.plot_scores(scores, exclude=eog_inds, show=False)</span><br>

</span></div><div class="gmail_extra"><span style="font-family:courier new,monospace">plt.close(fig)</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">and this should not open a figure for the specified plot.<br>

<br></div><div class="gmail_extra">Mainak<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 18, 2014 at 11:06 AM, Maria Hakonen <span dir="ltr">&lt;<a href="mailto:maria.hakonen@gmail.com" target="_blank">maria.hakonen@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<br><br>I moved matplotlib.use(&#39;Agg&#39;) before all imported modules but matplotlib as follows and this seems to run without displaying the figures: <br>

<div class=""><br>import matplotlib<br>matplotlib.use(&#39;Agg&#39;)<br></div>
import matplotlib.pyplot as plt<div class=""><br>import numpy as np<br>import mne<br>from <a href="http://mne.io" target="_blank">mne.io</a> import Raw<br>import os<br>from mne.preprocessing import ICA, create_eog_epochs<br>

<br></div>This doesn&#39;t work:<br>
import matplotli<div class=""><br>import numpy as np<br>import mne<br>from <a href="http://mne.io" target="_blank">mne.io</a> import Raw<br>import os<br>from mne.preprocessing import ICA, create_eog_epochs<br></div>matplotlib.use(&#39;Agg&#39;)<br>

import matplotlib.pyplot as plt<br>
<br>Regards,<br>Maria<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-18 2:04 GMT+03:00 Teon Brooks <span dir="ltr">&lt;<a href="mailto:teon.brooks@gmail.com" target="_blank">teon.brooks@gmail.com</a>&gt;</span>:<div>

<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hey everyone,<div><br></div><div>I was looking at the code for plot_ica_scores and there is currently no &#39;show&#39; kwarg. Also there&#39;s no conditional statement related to this as well. I just submitted a PR to address this.</div>


<span><font color="#888888">

</font></span></div><div class="gmail_extra"><span><font color="#888888"><br clear="all"><div><div dir="ltr">-teon</div></div></font></span><div><div>
<br><br><div class="gmail_quote">On Sun, Aug 17, 2014 at 10:50 PM, Mainak Jas <span dir="ltr">&lt;<a href="mailto:mainakjas@gmail.com" target="_blank">mainakjas@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr"><div class="gmail_extra">Hi Maria,<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div>On Sun, Aug 17, 2014 at 7:27 PM, Maria Hakonen <span dir="ltr">&lt;<a href="mailto:maria.hakonen@gmail.com" target="_blank">maria.hakonen@gmail.com</a>&gt;</span> wrote:<br>






</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I have set the show parameter false as follows:</div><div> ica.plot_sources(epochttps://<a href="http://mail.google.com/mail/u/0/?tab=wm#label/m-lists%2FMNE_analysis/147e00e5cb0f01d8hs_bp,eog_inds,show=False" target="_blank">mail.google.com/mail/u/0/?tab=wm#label/m-lists%2FMNE_analysis/147e00e5cb0f01d8hs_bp,eog_inds,show=False</a>)<br>






 </div></div></blockquote><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>However, the figures are still shown. I wonder what could be wrong there?</div>






</div></blockquote><div><br></div></div><div>It seems to me that you intend to use exclude=eog_inds but since you do not pass it as a keyword argument, it might get interpreted differently and give unexpected results. Is epochs_bp an instance of Epochs? I raised an issue on github: <a href="https://github.com/mne-tools/mne-python/issues/1516" target="_blank">https://github.com/mne-tools/mne-python/issues/1516</a> to fix the problem with show=False. You should install the development version and use show=False once this is fixed.<span><font color="#888888"><br>






<br></font></span></div><span><font color="#888888"><div>Mainak<br></div></font></span><div><div><div><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr"><div>
<br></div><div>-Maria</div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <span dir="ltr">&lt;<a href="mailto:alexandre.gramfort@telecom-paristech.fr" target="_blank">alexandre.gramfort@telecom-paristech.fr</a>&gt;</span>:<div>






<div><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">hi Maria,<br>
<div><br>
&gt; Thanks for the answer.<br>
&gt; However, the script seems to run very long time if ipython is started<br>
&gt; without --pylab qt flag. I wonder if there is any other ways to save the<br>
&gt; figures in the loop without displaying them?<br>
<br>
</div>most viz functions have a show parameter that is true by default. Set it<br>
to false to avoid showing the figures.<br>
<br>
HTH<br>
Alex<br>
<div><div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br>
</div></div></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div></div>