[Mne_analysis] Creating figures without displaying them?

Maria Hakonen maria.hakonen at gmail.com
Thu Sep 14 11:48:32 EDT 2017
Search archives:

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


More information about the Mne_analysis mailing list