[Mne_analysis] Creating figures without displaying them?

Alexandre Gramfort alexandre.gramfort at inria.fr
Thu Sep 14 14:56:07 EDT 2017
Search archives:

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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170914/777ad91c/attachment.html 


More information about the Mne_analysis mailing list