Skip to content

VIZ, BUG: plot_compare_evokeds(..., axes='topo') fails for CSD channel types #7933

Closed

Description

@drammock

probably related to mne.channels.layout.generate_2d_layout. The plot succeeds, but all the axes are squished into the lower left corner and the figure is mostly empty space. To reproduce:

import mne

data_path = mne.datasets.sample.data_path()

raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif',
                          preload=True)
raw.pick_types(meg=False, eeg=True, eog=True, ecg=True, stim=True, exclude='bads')
events = mne.find_events(raw)
raw.set_eeg_reference(projection=True).apply_proj()

event_id = {'auditory/left': 1, 'auditory/right': 2, 'visual/left': 3,
            'visual/right': 4, 'smiley': 5, 'button': 32}
epochs = mne.Epochs(raw, events, event_id=event_id, tmin=-0.2, tmax=0.5,
                    preload=True)
evoked = epochs['auditory'].average()

evoked_csd = mne.preprocessing.compute_current_source_density(evoked)

mne.viz.plot_compare_evokeds(evoked_csd, picks='csd', axes='topo')

Activity

  1. self-assigned this
    on Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions