[Mne_analysis] Creating figures without displaying them?

Maria Hakonen maria.hakonen at gmail.com
Sat Sep 16 08:19:27 EDT 2017
Search archives:

Many thanks!
I will try that.

Best,
Maria

2017-09-14 21:56 GMT+03:00 Alexandre Gramfort <alexandre.gramfort at inria.fr>:

> hi Maria,
>
> stc.plot uses mayavi and opengl and not matplotlib.
>
> to use it in "headless" mode ie without an x server see:
>
> http://docs.enthought.com/mayavi/mayavi/tips.html#
> rendering-using-the-virtual-framebuffer
>
> HTH
> ALex
>
>
> On Thu, Sep 14, 2017 at 5:48 PM, Maria Hakonen <maria.hakonen at gmail.com>
> wrote:
>
>> Dear mne experts,
>>
>> I am trying to create figures without displaying them.
>>
>> I have used Agg as follows:
>>
>> import matplotlib
>> matplotlib.use('Agg')
>> import matplotlib.pyplot as plt
>>
>> ica.plot_sources, ica.plot_overlay and ica.plot_scores seem to work
>> correctly.
>>
>> However, "fig = stc.plot(surface='inflated', hemi=hemi,
>> subjects_dir=subjects_dir, figure=i)" gives "ipython: cannot connect to X
>> server".
>>
>> Any ideas what might be wrong?
>>
>> Best,
>> 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/20170916/004cc117/attachment.html 


More information about the Mne_analysis mailing list