[Mne_analysis] mne-python saving epochs drop log plot

Denis-Alexander Engemann denis.engemann at gmail.com
Tue Jan 28 14:13:44 EST 2014
Search archives:

Hi Kam,

great to know and thanks for sharing this.
Another way to do it is exemplified in my .bash_profile file :

https://gist.github.com/dengemann/8674149#file-bashrc-L31

and the following line

Cheers,
Denis


On Tue, Jan 28, 2014 at 8:09 PM, Kambiz Tavabi <ktavabi at uw.edu> wrote:
> Thanks Denis. I finally got this thing to work. For anyone who is
> interested; I edited my matplotlib config file setting for backend to use
> Qt4agg and set the bindings for the backend to pyside i.e., the specific
> modifications I made in the matplotlibrc file are:
>
> `backend: Qt4agg`
> `backend.qt4 : PySide`
>
> cheers,
> Kam
>
> P.s. The alternative to PySide is PyQt4, which does not appear to be on good
> terms with the Anaconda python environment. I believe it is not available
> for install through their repositories, and I was also unable to find it via
> `pip`. PyQT4 depends on a module called SIP that installs rather painlessly
> after downloading source and building, however I encountered lots of ugly
> errors trying the same approach with PyQT4...TBC
>
>
>
> ------------------------------------------------------------
> 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 Sun, Jan 26, 2014 at 4:38 AM, Denis-Alexander Engemann
> <denis.engemann at gmail.com> wrote:
>>
>> 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