Back to the main page.

Bug 2066 - no channselection in multiplot in interactive mode?

Reported 2013-03-18 12:33:00 +0100
Modified 2019-08-10 12:03:17 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to:
Depends on:
See also:

Jörn M. Horschig - 2013-03-18 12:33:07 +0100

I do not see the reason why this is only allowed for non-interactive calls. I would strongly vote for allowing for this also in interactive mode. If someone is against allowing this, then we should at least throw a warning so that the user gets notified

Jörn M. Horschig - 2013-03-18 12:36:12 +0100

especially because the default for cfg.interactive is 'yes'

Jörn M. Horschig - 2013-03-18 12:46:31 +0100

more info: if isfield(data, 'label') && strcmp(cfg.interactive, 'no') selchannel = ft_channelselection(, data.label); elseif isfield(data, 'labelcmb') && strcmp(cfg.interactive, 'no') selchannel = ft_channelselection(, unique(data.labelcmb(:))); end

Robert Oostenveld - 2013-03-18 12:57:45 +0100

I would expect (1) cfg = []; ft_whateverplot(cfg, data) to behave similar to (2) cfg = [] data = ft_selectdata(cfg,data) cfg = [] ft_whateverplot(cfg, data) Consequently, in interactive mode one would not be able to get the initially non-selected channels back into view. Initially removed channels stay removed and are not able to affect the plot. With my fix to Anne's problem, it is implemented for (1) by ensuring that the layout does not include the channels. If the channels are missing in the layout, they can not be plotted.

Robert Oostenveld - 2013-03-18 12:59:53 +0100

(In reply to comment #2) note that in private/topoplot_common.m around line 312 I changed that into if isfield(data, 'label') = ft_channelselection(, data.label); elseif isfield(data, 'labelcmb') = ft_channelselection(, unique(data.labelcmb(:))); end as I also did not understand why this would be conditional on interactive=true/false.

Jörn M. Horschig - 2013-03-18 13:29:52 +0100

(In reply to comment #4) in topoplot_common, the same lines about selchannel are also in (just 2 lines below what you copied) I see the change you made to ft_prepare_layout and was wondering why it did not work for me. It turns out, your change is specific to when providing a layout but not when loading a layout from disk, so e.g. for cfg = []...; cfg.layout = 'EEG1010.lay', ft_xxxplot(cfg, data); still all channels would be plotted. I changed it such that the channelselection takes place at the end of ft_prepare_layout after the layout has been initialized for all cases. Also, I marked this as a duplicate of bug 2059, because it was caused by the same issue. Finally, I updated the test script of bug 2059 - and fixed a bug in that testcript ;) svn ci ft_prepare_layout.m test/test_bug2059.m -m "bugfix #2059 #2066 - subselection of channels when plotting works again for all cases, testscript extended" Sending ft_prepare_layout.m Sending test/test_bug2059.m Transmitting file data .. Committed revision 7690. *** This bug has been marked as a duplicate of bug 2059 ***

Robert Oostenveld - 2013-03-18 13:54:38 +0100

(In reply to comment #5) > I changed it such that the channelselection takes place at the end of > ft_prepare_layout after the layout has been initialized for all cases. smart thinking!

Robert Oostenveld - 2019-08-10 12:03:17 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on