AverageTFR.plot() only plots one channel
See original GitHub issueAlthough AverageTFR.plot()
has a picks
argument, only the first channel is plotted. I don’t think this is by design - or is it? If so, then at least the docstring is confusing, because it explicitly mentions that None
selects all good channels and "all"
selects all channels.
import numpy as np
import mne
n_chans = 10
n_epochs = 100
tmin, tmax = -2, 5
fs = 256
info = mne.create_info(n_chans, fs, "eeg")
data = np.random.rand(n_epochs, n_chans, (abs(tmin) + abs(tmax)) * fs + 1)
epochs = mne.EpochsArray(data, info, tmin=tmin)
freqs = np.arange(1, 51)
tfr = mne.time_frequency.tfr_multitaper(epochs, freqs=freqs, n_cycles=freqs,
average=False, return_itc=False)
tfr.average().plot()
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
mne.time_frequency.AverageTFR — MNE 1.2.2 documentation
If list, the list must be a list of Axes of the same length as picks . If instance of Axes, there must...
Read more >Plotting of mne.combine_evoked output based on ...
Plotting of mne.combine_evoked output based on AverageTFR input (mutiple channels) only shows TFR output of the ... AverageTFR.plot() only plots one channel.
Read more >Viz improvement: AverageTFR.plot_joint · Issue #3801 - GitHub
If True, show only one plot: the average over all selected channels. If picks is empty, the mean over all channels is plotted....
Read more >mne.time_frequency.AverageTFR
If not None, override default verbose level (see mne.verbose() and Logging ... If instance of Axes, there must be only one channel plotted....
Read more >Plotting data at the channel and source level - FieldTrip toolbox
You could make the same plot by the following code, using the MATLAB plot command. selected_data = avgFC.avg(9,241 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, that’s right. I meant in my commit. Fixing that issue of always getting exactly one figure, wIthout changing the default behaviour of picks, will lead to as many figures as you have channels.
Seems to have been fixed by #9150.