How to save figures in a loop without displaying them?

Hi all,

I would like to remove eog artifacts from several files in a loop using ica
and save some plots of the ica results without displaying them while the
loop is running. I have tried this as follows:

subjects = ['av','li','kk','mh','ml']
for s in range(0,5):
        sessions = ['_s1','_s2','_s3']
        for x in range(0, 3):
                ...

                fig = ica.plot_scores(scores, exclude=eog_inds)
                file_end= 'scores.png'
                filename = subjects[s]+sessions[x]+file_end
                plt.savefig(filename)
                plt.close(fig)

                fig=ica.plot_sources(epochs_bp,eog_inds)
                file_end = 'sources.png'
                filename = subjects[s]+sessions[x]+file_end
                plt.savefig(filename)
                plt.close(fig)

                fig=ica.plot_components(eog_inds, colorbar=True)
                file_end = 'components.png'
                filename = subjects[s]+sessions[x]+file_end
                plt.savefig(filename)
                plt.close(fig)
                ica.exclude += eog_inds[:1]
                 ...

However, I get errors pasted below. They seem to come from plt.close(fig).
Could somebody please let me know what I am doing wrong. Thanks already in
advance!

RuntimeError Traceback (most recent call last)
/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.pyc in
<lambda>()
    149 # self.close_event)

    150 QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
--> 151 lambda: self.close_event())
    152
    153 def __timerEvent(self, event):

/usr/lib/pymodules/python2.7/matplotlib/backend_bases.pyc in
close_event(self, guiEvent)
   1562 try:
   1563 event = CloseEvent(s, self, guiEvent=guiEvent)
-> 1564 self.callbacks.process(s, event)
   1565 except TypeError:
   1566 pass

RuntimeError: underlying C/C++ object has been deleted

Best Regards,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140816/105cec07/attachment.html

Hi Maria,

just use ```plt.close('all')```.

I would recommend to add the following two lines at the top of your script :

import matplotlib
matplotlib.use('Agg')

This will invoke matplotibs silent mode in which the figures are produced
but not shown.

With this addition you have to start ipython without --pylab flag because
the backend has to be set first.

HTH,
Denis

Hi,

Thanks for the answer.
However, the script seems to run very long time if ipython is started
without --pylab qt flag. I wonder if there is any other ways to save the
figures in the loop without displaying them?

Regards,
Maria

2014-08-16 21:27 GMT+03:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

just use ```plt.close('all')```.

I would recommend to add the following two lines at the top of your script
:

import matplotlib
matplotlib.use('Agg')

This will invoke matplotibs silent mode in which the figures are produced
but not shown.

With this addition you have to start ipython without --pylab flag because
the backend has to be set first.

HTH,
Denis

Hi all,

I would like to remove eog artifacts from several files in a loop using
ica and save some plots of the ica results without displaying them while
the loop is running. I have tried this as follows:

subjects = ['av','li','kk','mh','ml']
for s in range(0,5):
        sessions = ['_s1','_s2','_s3']
        for x in range(0, 3):
                ...

                fig = ica.plot_scores(scores, exclude=eog_inds)
                file_end= 'scores.png'
                filename = subjects[s]+sessions+file_end
                plt.savefig(filename)
                plt.close(fig)

                fig=ica.plot_sources(epochs_bp,eog_inds)
                file_end = 'sources.png'
                filename = subjects[s]+sessions+file_end
                plt.savefig(filename)
                plt.close(fig)

                fig=ica.plot_components(eog_inds, colorbar=True)
                file_end = 'components.png'
                filename = subjects[s]+sessions+file_end
                plt.savefig(filename)
                plt.close(fig)
                ica.exclude += eog_inds[:1]
                 ...

However, I get errors pasted below. They seem to come from
plt.close(fig). Could somebody please let me know what I am doing wrong.
Thanks already in advance!

RuntimeError Traceback (most recent call
last)
/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.pyc in
<lambda>()
    149 # self.close_event)

    150 QtCore.QObject.connect(self, QtCore.SIGNAL('destroyed()'),
--> 151 lambda: self.close_event())
    152
    153 def __timerEvent(self, event):

/usr/lib/pymodules/python2.7/matplotlib/backend_bases.pyc in
close_event(self, guiEvent)
   1562 try:
   1563 event = CloseEvent(s, self, guiEvent=guiEvent)
-> 1564 self.callbacks.process(s, event)
   1565 except TypeError:
   1566 pass

RuntimeError: underlying C/C++ object has been deleted

Best Regards,
Maria

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/a157d737/attachment.html

hi Maria,

Thanks for the answer.
However, the script seems to run very long time if ipython is started
without --pylab qt flag. I wonder if there is any other ways to save the
figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex

I have set the show parameter false as follows:
ica.plot_sources(epochs_bp,eog_inds,show=False)

However, the figures are still shown. I wonder what could be wrong there?

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/7fff0b1d/attachment.html

Maria, does this happen for all plots that you try not to show? Might be a
bug in that particular function.

Btw. what did you mean when you said the script is running very long time?
You mean it hangs (because it's waiting for you to close the figures)?
Have you been able to activate the 'Agg' silent backend using the lines I
suggested?

-Denis

Hi,

I tried to activate Agg by adding matplotlib.use('Agg') in my code. Before
it I have imported:

import numpy as np
import mne
from mne.io import Raw
import os
from mne.preprocessing import ICA, create_eog_epochs
import matplotlib
import matplotlib.pyplot as plt

I also added plt.close('all') at the end of the code.
I started python without --pylab qt flag (i.e. typing ipython).

However, I think that Agg is not activated because the script still plots
the figures and waits until the figure is closed.

-Maria

2014-08-17 19:32 GMT+03:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Maria, does this happen for all plots that you try not to show? Might be a
bug in that particular function.

Btw. what did you mean when you said the script is running very long time?
You mean it hangs (because it's waiting for you to close the figures)?
Have you been able to activate the 'Agg' silent backend using the lines I
suggested?

-Denis

I have set the show parameter false as follows:
ica.plot_sources(epochs_bp,eog_inds,show=False)

However, the figures are still shown. I wonder what could be wrong there?

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save
the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/1326462a/attachment.html

Hi Maria,

Hi,

I tried to activate Agg by adding matplotlib.use('Agg') in my code. Before
it I have imported:

matplotlib.use('Agg') must be importet before

import numpy as np
import mne
from mne.io import Raw
import os
from mne.preprocessing import ICA, create_eog_epochs
import matplotlib

the line below

import matplotlib.pyplot as plt

can you confirm this is the case?

I also added plt.close('all') at the end of the code.
I started python without --pylab qt flag (i.e. typing ipython).

However, I think that Agg is not activated because the script still plots
the figures and waits until the figure is closed.

-Maria

2014-08-17 19:32 GMT+03:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Maria, does this happen for all plots that you try not to show? Might be a

bug in that particular function.

Btw. what did you mean when you said the script is running very long time?
You mean it hangs (because it's waiting for you to close the figures)?
Have you been able to activate the 'Agg' silent backend using the lines I
suggested?

-Denis

I have set the show parameter false as follows:
ica.plot_sources(epochs_bp,eog_inds,show=False)

However, the figures are still shown. I wonder what could be wrong there?

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save
the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/6ca58b15/attachment.html

I have imported matplotlib.use('Agg') before matplotlib.pyplot as plt and
also tried import it after matplotlib.pyplot but the result is the same.

-Maria

2014-08-17 22:35 GMT+03:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Maria,

Hi,

I tried to activate Agg by adding matplotlib.use('Agg') in my code.
Before it I have imported:

matplotlib.use('Agg') must be importet before

import numpy as np
import mne
from mne.io import Raw
import os
from mne.preprocessing import ICA, create_eog_epochs
import matplotlib

the line below

import matplotlib.pyplot as plt

can you confirm this is the case?

I also added plt.close('all') at the end of the code.
I started python without --pylab qt flag (i.e. typing ipython).

However, I think that Agg is not activated because the script still plots
the figures and waits until the figure is closed.

-Maria

2014-08-17 19:32 GMT+03:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Maria, does this happen for all plots that you try not to show? Might be

a bug in that particular function.

Btw. what did you mean when you said the script is running very long
time?
You mean it hangs (because it's waiting for you to close the figures)?
Have you been able to activate the 'Agg' silent backend using the lines
I suggested?

-Denis

I have set the show parameter false as follows:
ica.plot_sources(epochs_bp,eog_inds,show=False)

However, the figures are still shown. I wonder what could be wrong
there?

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save
the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set
it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to
you in error
but does not contain patient information, please contact the sender
and properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/f00feb0b/attachment.html

Hi Maria,

that's a bit unexpected. Maybe it depends on the matplotlib version.
Have you tried adding plt.ioff() to turn off interactive mode?

-D

Hi Maria,

I have set the show parameter false as follows:
ica.plot_sources(epochttps://
mail.google.com/mail/u/0/?tab=wm#label/m-lists%2FMNE_analysis/147e00e5cb0f01d8hs_bp,eog_inds,show=False
)

However, the figures are still shown. I wonder what could be wrong there?

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: https://github.com/mne-tools/mne-python/issues/1516 to fix
the problem with show=False. You should install the development version and
use show=False once this is fixed.

Mainak

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140817/04d60b34/attachment.html

Hey everyone,

I was looking at the code for plot_ica_scores and there is currently no
'show' kwarg. Also there's no conditional statement related to this as
well. I just submitted a PR to address this.

-teon

Hi all,

I moved matplotlib.use('Agg') before all imported modules but matplotlib as
follows and this seems to run without displaying the figures:

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import mne
from mne.io import Raw
import os
from mne.preprocessing import ICA, create_eog_epochs

This doesn't work:
import matplotli
import numpy as np
import mne
from mne.io import Raw
import os
from mne.preprocessing import ICA, create_eog_epochs
matplotlib.use('Agg')
import matplotlib.pyplot as plt

Regards,
Maria

2014-08-18 2:04 GMT+03:00 Teon Brooks <teon.brooks at gmail.com>:

Hey everyone,

I was looking at the code for plot_ica_scores and there is currently no
'show' kwarg. Also there's no conditional statement related to this as
well. I just submitted a PR to address this.

-teon

Hi Maria,

I have set the show parameter false as follows:
ica.plot_sources(epochttps://
mail.google.com/mail/u/0/?tab=wm#label/m-lists%2FMNE_analysis/147e00e5cb0f01d8hs_bp,eog_inds,show=False
)

However, the figures are still shown. I wonder what could be wrong there?

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: add show param to viz/ica.py · Issue #1516 · mne-tools/mne-python · GitHub to
fix the problem with show=False. You should install the development version
and use show=False once this is fixed.

Mainak

-Maria

2014-08-17 16:26 GMT+03:00 Alexandre Gramfort <
alexandre.gramfort at telecom-paristech.fr>:

hi Maria,

> Thanks for the answer.
> However, the script seems to run very long time if ipython is started
> without --pylab qt flag. I wonder if there is any other ways to save
the
> figures in the loop without displaying them?

most viz functions have a show parameter that is true by default. Set it
to false to avoid showing the figures.

HTH
Alex
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom
it is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140818/17b63cba/attachment.html

Great! The bug with the show parameter is now fixed. With the development
version, you should be able to simply do

fig = ica.plot_scores(scores, exclude=eog_inds, show=False)
plt.close(fig)

and this should not open a figure for the specified plot.

Mainak