[FieldTrip] default behaviour of singleplot changed?

Tom Marshall tom.marshall at psy.ox.ac.uk
Tue Nov 24 17:15:46 CET 2020


Hi fieldtrippers,

Has the default behaviour of the ft_singleplotXXX functions changed recently? Because I'm used to grouping several of them together using 'subplot' something like this...

% plot the TFR of the first five channels
figure
for i = 1:5
    cfg.channel = i;
    subplot(1, 5, i)
    ft_singleplotTFR(cfg, data)
end

Previously, executing this would give me five nicely arranged subplots within a single figure. However, using the bleeding-edge fieldtrip version, this code now creates five separate figures, each with a blank subplot, and the last TFR in its own sixth figure.

So it seems like 'subplot' is being executed (because matlab is drawing the subplot in a figure), but ft_singleplotTFR isn't drawing into the subplot, but rather creating a new figure.

checked:

which singleplotTFR
/home/common/matlab/fieldtrip/ft_singleplotTFR.m  (working on donders cluster - seems correct)

which subplot
/opt/matlab/R2020b/toolbox/matlab/graph2d/subplot.m (seems correct)


replacing ft_singleplotTFR(cfg, data) in the above code with a built-in plot function - e.g., imagesc(rand(10)) - gives the expected row of subplots, so it seems like some (new?) behaviour of ft_singleplotTFR is causing matlab to treat it differently to its own plots.


help ft_singleplotTFR: Nothing here about subplots or handles.


Can somebody advise? Something simple I'm missing?


Best,

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201124/34564a3f/attachment.htm>


More information about the fieldtrip mailing list