Skip to content

Vertical placement of channel traces seems off in raw butterfly plot #10083

@hoechenberger

Description

@hoechenberger

MWE:

# %%
from pathlib import Path
import mne
import numpy as np


sample_dir = Path(mne.datasets.sample.data_path())
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(sample_fname, preload=True)

# %%

fig = (
    raw.copy()
       .pick_types(eeg=True, eog=True, stim=True)
       .plot(butterfly=True, show_scrollbars=False, start=0,
             duration=1, show=False)
)

output

It appears as if the stim channel has a lot of signals, and the EOG channel were flat.

However, the following code reveals that this ain't so:

# %%
fig = (
    raw.copy()
       .pick_types(stim=True)
       .plot(butterfly=True, show_scrollbars=False, start=0,
             duration=1, show=False)
)

output

# %%
fig = (
    raw.copy()
       .pick_types(eog=True)
       .plot(butterfly=True, show_scrollbars=False, start=0,
             duration=1, show=False)
)

output

cc @drammock

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions