[Mne_analysis] mne-python saving epochs drop log plot

Denis-Alexander Engemann denis.engemann at gmail.com
Sun Jan 26 07:38:48 EST 2014
Search archives:

Kam,

I've recently spotted a similar problem when trying to save matplotlib
figures from a ipython qt-console that runs in inline mode.

Can you make sure you use ipython with a qt backend?

Best,
Denis

On Sun, Jan 26, 2014 at 1:35 PM, Alexandre Gramfort
<alexandre.gramfort at telecom-paristech.fr> wrote:
> hi Kam,
>
> plt.savefig(info.get('filename')[:-4] + '_droplog.pdf', dpi=100, format='pdf')
>
> works fine on my machine.
>
> Note that I added the .pdf extension.
>
> Alex
>
> On Sat, Jan 25, 2014 at 8:01 PM, Kambiz Tavabi <ktavabi at uw.edu> wrote:
>> Hi Alex,
>> I've tried this as well with same result i.e., blank file. Here is what I am
>> doing:
>>
>> import matplotlib.pyplot as plt
>> _ = epochs.drop_bad_epochs()
>> plot_drop_log(epochs.drop_log, subject=subj)
>> plt.savefig(info.get('filename')[:-4] + '_droplog', dpi=100, format='pdf')
>>
>> I can verify this works because I see the figure window and appropriate drop
>> plot. The documentation says plot_drop_log returns a float, so I am not sure
>> where in the ether the associated figure window ends up. I am using
>> mne-python version 0,8.
>>
>> cheers,
>> Kam
>>
>> ------------------------------------------------------------
>> Kambiz Tavabi PhD
>> Institute for Learning & Brain Sciences
>> 1715 Columbia Road N
>> Portage Bay Building
>> Box 357988
>> University of Washington
>> Seattle, WA 98195-7988
>> Tel: 206-685-6173
>> ------------------------------------------------------------
>>
>>
>> On Sat, Jan 25, 2014 at 1:56 AM, Alexandre Gramfort
>> <alexandre.gramfort at telecom-paristech.fr> wrote:
>>>
>>> hi Kam,
>>>
>>> with the current version of mne-python you can do:
>>>
>>> epochs.plot_drop_log()
>>> import matplotlib.pyplot as plt
>>> plt.savefig('fig.pdf')
>>>
>>> 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.
>



More information about the Mne_analysis mailing list