mne_rt.viz.ButterflyPlot#
- class mne_rt.viz.ButterflyPlot(ch_names: list[str], sfreq: float, tmin: float, tmax: float, event_id: dict[str, int], info=None, montage: str = 'standard_1020', baseline: tuple | None = (None, 0), window_size: tuple[int, int] = (1440, 900), verbose: bool | str | None = None)[source]#
Bases:
_MockQMainWindowReal-time butterfly plot: all EEG/MEG channels overlaid per condition.
Each condition gets its own
pyqtgraph.PlotItemstacked vertically in apyqtgraph.GraphicsLayoutWidget. Channels are drawn as thin lines coloured by scalp region (blue → cyan → green → amber → red from frontal to occipital).- Parameters:
- ch_names
listofstr Electrode names in data order.
- sfreq
float Sampling frequency in Hz.
- tmin
float Epoch start (s).
- tmax
float Epoch end (s).
- event_id
dict[str,int] Condition label → marker integer.
- info
mne.InfoorNone When provided, used for exact scalp positioning via
mne.channels.find_layout().- montage
str, default"standard_1020" Fallback montage when info is absent or has no dig points.
- baseline
tupleorNone, default(None, 0) Baseline correction interval.
- window_size
tupleofint, default(1440, 900) Initial window size in pixels.
- verbosebool,
str, orNone - .. versionadded:: 1.0.0
- ch_names
See also
mne_rt.RTEpochsDrives this plot via
update().
- __init__(ch_names: list[str], sfreq: float, tmin: float, tmax: float, event_id: dict[str, int], info=None, montage: str = 'standard_1020', baseline: tuple | None = (None, 0), window_size: tuple[int, int] = (1440, 900), verbose: bool | str | None = None) None[source]#
Methods
__init__(ch_names, sfreq, tmin, tmax, event_id)update(data, conditions)Redraw all butterfly plots with updated condition averages.