Cannot Modify y-axis Limits for evoked.plot_joint function

  • MNE version: 1.7.1
  • operating system: Windows 10

Hi,

I am trying to use the evoked.plot_joint function to make some plots of my data. I want to be able to manually scale the y-axis of the butterfly plot but changing the ylim parameters doesn’t seem to have any effect on the y-axis range. Has anyone had this problem before? Here is the code I am using:

ts_args = dict(time_unit="ms", units=dict(eeg='µV'), ylim=(-10,10))
topomap_args = dict(time_unit="ms")
fig = diff1_evoked.plot_joint(times=[0.1,0.2,0.3], ts_args=ts_args, topomap_args=topomap_args);

The documentation states:

ylim : dict | None
    Y limits for plots (after scaling has been applied). e.g. 
    ylim = dict(eeg=[-20, 20]) Valid keys are eeg, mag, grad, 
    misc. If None, the ylim parameter for each channel equals 
    the pyplot default.

You are providing a tuple, I’m actually surprised this is not raising an error.
Try providing dict(eeg=(-10, 10) (in case of EEG data, change the type to what you need, note that CSD transformed data has the type csd).

Mathieu

That worked, thanks so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.