[FieldTrip] MultiplotTFR

Patrick Wiegel patrick.wiegel at sport.uni-freiburg.de
Mon Nov 9 14:37:36 CET 2020


Hi Jan Mathijs,

thanks for the quick fix and your response. And good that it was „only“ the missing hold on command. Then it also makes sense that only one TFR survived in the end.

All the best,
Patrick


Patrick Wiegel
Department of Sport and Sport Science

University of Freiburg
Sandfangweg 4
79117 Freiburg i. Br .

phone: +49 (0)761/ 203-4550
email: patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>
web: www.sport.uni-freiburg.de

Am 09.11.2020 um 11:48 schrieb Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>:

Hi Patrick,

Thanks for reporting the issue! Indeed, it was a genuine ‘bug’ in the code, which caused the multiplot to be wrong. Long story short, when introducing some changes to the code, which were intended to make the set of functions that do data visualization in FT a bit more internally consistent, the ‘hold on’ commands disappeared from the multiplot functions by accident. This causes the individual channel TFRs (which are plotted one after the other) to replace each other in the figure, rather than to be placed within the same figure. Interestingly, that you identified this only now, because this code change was done a while ago.

We have now fixed it in the master branch of the FieldTrip repository. Once the most recent changes to the codebase survive our battery of test functions, the fix will be available in the release version very soon. Stay tuned, and thanks again for reporting.

Best wishes,
Jan-Mathijs


On 5 Nov 2020, at 09:01, Stephen Whitmarsh <stephen.whitmarsh at gmail.com<mailto:stephen.whitmarsh at gmail.com>> wrote:

Hi Patrick,

I couldn't resist to try your example and on my Windows 10 computer, MATLAB 2019b, current FT version, your problem replicates.
All seems well with ft_topoplot_TFR (also interactive mode) and ft_singleplot_TFR, but ft_multiplotTFR behaves strangely indeed (attached).

Cheers,
Stephen

Op wo 4 nov. 2020 om 17:27 schreef Patrick Wiegel <patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>>:
Hi Jan-Mathijs,

I uploaded the code and the data to (https://github.com/PatrickWiegel/MultiplotTFR_plotting.git).

It would be interesting to see whether you experience the same problem with my data.

Best wishes,
Patrick



Patrick Wiegel
Department of Sport and Sport Science

University of Freiburg
Sandfangweg 4
79117 Freiburg i. Br .

phone: +49 (0)761/ 203-4550
email: patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>
web: www.sport.uni-freiburg.de<http://www.sport.uni-freiburg.de/>

Am 04.11.2020 um 16:27 schrieb Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>:

Hi Patrick,

The only thing that can be done, is to try and reproduce the issue using your specific data. If this data is not too big, you can send it (off list), or even better: file an issue on github + a link to get the data, so that we (i.e. one of the FT developers) can have a look.

Best wishes,
Jan-Mathijs


On 4 Nov 2020, at 15:11, Patrick Wiegel <patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>> wrote:

Hi Jan-Mathijs,

thanks for the fast response. I don’t have any other matlab figures opened. I had a look in the history of the function but was not able to identify the problem.

However, if it working for you, then it is probably something related to my script/setup.

Best, Patrick

Patrick Wiegel
Department of Sport and Sport Science

University of Freiburg
Sandfangweg 4
79117 Freiburg i. Br .

phone: +49 (0)761/ 203-4550
email: patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>
web: www.sport.uni-freiburg.de<http://www.sport.uni-freiburg.de/>

Am 04.11.2020 um 14:45 schrieb Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>:

Hi Patrick,

It works fine for me, so I cannot reproduce your issue. Have you tried closing all open figures in MATLAB before calling ft_multiplotTFR?


Since this is the second e-mail today that explicitly mentions a ‘break’ in functionality, let me seize the opportunity to point to the possibility that users can already play a little bit more detective than just mentioning ‘it worked in version X and not anymore in version Y’. If you go to the github repository https://github.com/fieldtrip/fieldtrip you can actually check the changes to the code in more detail, by investigating the ‘history’ of the function. This already could give you a headstart in describing the problem, and would give people inclined to look into this with you some handles to work with.



Best wishes,

Jan-Mathijs



On 4 Nov 2020, at 14:21, Patrick Wiegel <patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>> wrote:

Dear community,

I am trying to use the function ft_multiplotTFR for time-frequency data generated by ft_frequanalyses (wavelet method) using the following code:

cfg = [];
cfg.layout = 'biosemi64.lay';
cfg.parameter = 'powspctrm';
cfg.xlim = [0 0.9];
ft_multiplotTFR(cfg, tfr_grandavg)

The result of the multiplot function is a single TF plot (see attachment) rather than 64 single channel TF plots arranged in the specified layout. It might be a bug in the newer fieldtrip versions (fieldtrip-20201103) since the plot is correctly generated using older versions (e.g. fieldtrip-20200508). It would be great if anyone could test the function.

Best, Patrick

<multiplotTFR.jpg>
Patrick Wiegel
Department of Sport and Sport Science

University of Freiburg
Sandfangweg 4
79117 Freiburg i. Br .

phone: +49 (0)761/ 203-4550
email: patrick.wiegel at sport.uni-freiburg.de<mailto:patrick.wiegel at sport.uni-freiburg.de>
web: www.sport.uni-freiburg.de<http://www.sport.uni-freiburg.de/>

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
<singleplot.jpg><multiplot.jpg>_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201109/e871054b/attachment.htm>


More information about the fieldtrip mailing list