Show only one group of channels (eeg) in raw.plot() while in the butterfly mode

  • MNE version: 1.3.0
  • operating system: Windows-10-10.0.20348-SP0

Hi, I’m trying to show only EEG channels in the butterfly mode, but neither shortcuts in the browser, nor passing the n_channels argument to the plot function don’t have the effect.
In the documentation I’ve found that changing number of channels “Has no effect if order is ‘position’, ‘selection’ or ‘butterfly’”.

Is there any workaround that can help me?
Does it make sense to open an issue for this in the GitHub repo?

Best,
Gennadiy

Hello @Genuster and welcome to the forum!

Showing only a single channel in butterfly mode doesn’t make much sense, as it wouldn’t be a “butterfly” plot anymore. If you want to view just a single channel, don’t request butterfly mode and pass n_channels=1.

Best wishes,
Richard

Thanks, @richard.

I worded the title badly, I guess. I’ve edited it. I don’t want to show only a single channel, but a single group of channels, like only EEG channels, only MEG channels, etc.

Gennadiy

You are right, the shortcut fn + ↓ (or PgDown) does not decrease the number of visible channels (or channel groups in this case) to zoom in to just one channel (group). I’m not sure if this is intentional or a bug. It seems like this would be a useful feature, so I’m guessing it’s a bug (in which case you could open an issue on our GitHub page).

You could do

raw.copy().pick_types('eeg').plot(butterfly=True)
2 Likes

Although this works, I think having keyboard shortcuts would still be very useful.

Should be a checkbox :ballot_box_with_check:

@richard, it works, thank you.
It creates, though, a heavy load on RAM. I work with large overnight datasets, so two raw objects with loaded data may exceed 64GB limit I currently have.

@cbrnr I’ll open the issue then. I just guessed that there is a reason for not implementing the feature, as it’s explicitly mentioned in the documentation.

Thanks again,
Gennadiy

Maybe there is a reason why it doesn’t work, but if there is someone will let us know in the issue you create (please link it here so that people can find it).

Here’s the issue.