Back to the main page.

Bug 2552 - use consistent naming of figures and titles

Reported 2014-04-30 12:24:00 +0200
Modified 2019-08-10 12:43:42 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 trivial
Assigned to:
Depends on: 3079
See also:

Jörn M. Horschig - 2014-04-30 12:24:29 +0200

for multi-, single- and topoplots the figures got nice ft_ names, not so for sourceplot though...

Robert Oostenveld - 2014-04-30 12:31:00 +0200

good point. There is this if isempty(cfg.figurename) set(gcf, 'Name', sprintf('%d: %s: %s', gcf, mfilename, join_str(', ',dataname))); set(gcf, 'NumberTitle', 'off'); else set(gcf, 'name', cfg.figurename); set(gcf, 'NumberTitle', 'off'); end in ft_multiplotER.m at line 714 of 855. We have the functions mac011> ls *plot*m ft_clusterplot.m ft_connectivityplot.m ft_layoutplot.m ft_movieplotER.m ft_movieplotTFR.m ft_multiplotCC.m ft_multiplotER.m ft_multiplotTFR.m ft_neighbourplot.m ft_singleplotER.m ft_singleplotTFR.m ft_sourceplot.m ft_topoplotCC.m ft_topoplotER.m ft_topoplotIC.m ft_topoplotTFR.m It would make sense if something like this were added to all plot figures.

Robert Oostenveld - 2014-04-30 12:33:47 +0200

looking at, I don't see cfg.figurename being referenced anywhere. It is implemented in mac011> grep -l cfg.figurename *.m ft_databrowser.m ft_multiplotER.m ft_multiplotTFR.m ft_singleplotER.m ft_singleplotTFR.m or perhaps this is a better list mac011> grep -l set.*\'[nN]ame\' *.m ft_anonimizedata.m ft_databrowser.m ft_layoutplot.m ft_multiplotER.m ft_multiplotTFR.m ft_singleplotER.m ft_singleplotTFR.m ft_topoplotCC.m

Jörn M. Horschig - 2014-04-30 12:44:36 +0200

how about implementing ft_postamble figure(name)?

Robert Oostenveld - 2014-04-30 15:32:18 +0200

(In reply to Jörn M. Horschig from comment #3) I think a postamble would be overkill due to its complexity. In some plotting functions multiple windows get opened, which complicates matters. Also, plain code would be easier to maintain by less skilled contributors.

Robert Oostenveld - 2016-12-07 08:57:15 +0100

Lay added an axis title to ft_singleplotTFR in That triggered me to look in bugzilla and I found this issue that relates to it. It is important to stay consistent, which means that all functions that can support either title (above the axis) or figure name (in the window bar at the top) should do so. @Lau, can you please also add cfg.title to ft_singleplotER as a start? Once that is in place, we should still look at the figure name.

Lau Møller Andersen - 2016-12-07 09:42:41 +0100

This has been done now

Robert Oostenveld - 2016-12-07 15:22:01 +0100


Robert Oostenveld - 2016-12-07 15:22:39 +0100

oops, the single plot being fixed does not mean that the whole bug is resolved. So I should not have set it to FIXED yet...

Jan-Mathijs Schoffelen - 2019-03-28 15:40:12 +0100

Rumour has it that this has now been addressed by Robert.

Robert Oostenveld - 2019-03-28 17:23:18 +0100

yep, as of this morning the figure titles should now be consistent in all plotting functions.

Robert Oostenveld - 2019-08-10 12:43:42 +0200

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