[Mne_analysis] MNE-python plotting evoked responses

Eric Larson larson.eric.d at gmail.com
Wed Jul 31 19:39:11 EDT 2013
Search archives:

Hey Kambiz,

mne-python will overwrite your axis title with its own. Does it work if you
move the line ax.set_title after the evokeds.plot() line?

The "titles" keywoard argument not working might be a bug, I'd have to look
(Alex, Denis?).

Eric



On Wed, Jul 31, 2013 at 4:34 PM, Kambiz Tavabi <ktavabi at uw.edu> wrote:

> Greetings
> I am using the following loop to plot the evoked response iterating over
> several different conditions:
> # Create the figure (Letter format)
> for j, cond in enumerate(['Known', 'Known-ctrl', 'Unknown',
> 'Unkown-ctrl']):
>     figure(num=j, figsize=(8.5,11), dpi=100)
>     ax = subplot2grid((4, 2), (j, 0), rowspan=1, colspan=2)
>     ax.set_title(r"$MEG evoked field, %s trials$" % cond, fontsize=16)
>     evokeds[j].plot(picks=mag_picks, axes=ax)
>     # Save to PDF
>     #savefig("%s.pdf" % TITLE)
>
> I get the figure(s) I want but I cannot figure out how to set the title.
> The above ax.set_title statement seems to do nothing, nor does
> evokeds[j].plot(picks=mag_picks, axes=ax, titles=event_ids);
> where event_ids = {'Known': 1, 'Known-ctrl': 2, 'Unknown': 3,
> 'Unkown-ctrl': 4}. In both case the axes title defaults to channel type
> e.g., Magnetometers (102 channels). If I follow the example here<http://martinos.org/mne/auto_examples/plot_from_raw_to_multiple_epochs_to_evoked.html> then
> the above code will generate additional empty axes with the names I want
> for each iteration; i.e., inserting the statement: `title ("MEG evoked
> field, %s trials" % cond)` into the loop. Could someone please explain this
> behavior? Thanks in advance. Kambiz
>
> --
> ------------------------------------------------------------
> 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
> ------------------------------------------------------------
>
> _______________________________________________
> 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/20130731/bb4715e6/attachment.html 


More information about the Mne_analysis mailing list