[Mne_analysis] MNE-python plotting evoked responses

Kambiz Tavabi ktavabi at uw.edu
Fri Aug 2 20:32:58 EDT 2013
Search archives:

Hi Denis,

The plotting in the delayed-ssp demo is exactly what I was looking for.
Thank you. However, it looks like some ipython notebook finickiness
prevents me from pulling it off in a notebook.

best,
Kam


On Wed, Jul 31, 2013 at 11:54 PM, Denis-Alexander Engemann <
denis.engemann at gmail.com> wrote:

> Hi Kambiz,
>
>
> On Thu, Aug 1, 2013 at 8:45 AM, Alexandre Gramfort <
> alexandre.gramfort at telecom-paristech.fr> wrote:
>
>> hi Kambiz,
>>
>> have a look at this example:
>>
>>
>> http://martinos.org/mne/auto_examples/plot_from_raw_to_multiple_epochs_to_evoked.html
>>
>>
> an alternative way to do it is illustrated in this example:
>
>
> http://martinos.org/mne/auto_examples/plot_evoked_delayed_ssp.html#example-plot-evoked-delayed-ssp-py
>
>
> Best,
> Denis
>
>
>
>> for an example of subplots with custom titles.
>>
>> hope this helps
>>
>> Alex
>>
>> On Thu, Aug 1, 2013 at 2:45 AM, Kambiz Tavabi <ktavabi at uw.edu> wrote:
>> > Hi Eric,
>> >
>> > With the ax.set_title line in either position I get the same behavior
>> i.e.,
>> > X axes with butterfly plot & default axis title generated by
>> evoked.plot and
>> > X blank axes with the desired title.
>> >
>> > Kambiz
>> >
>> >
>> > On Wed, Jul 31, 2013 at 4:39 PM, Eric Larson <larson.eric.d at gmail.com>
>> > wrote:
>> >>
>> >> 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 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.
>> >>>
>> >>
>> >
>> >
>> >
>> > --
>> > ------------------------------------------------------------
>> > 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.
>> >
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>
>


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


More information about the Mne_analysis mailing list