Back to the main page.

Bug 1212 - ft_layoutplot fails to plot the labels

Reported 2011-12-01 22:36:00 +0100
Modified 2012-08-23 10:33:51 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: All
Operating System: All
Importance: P3 normal
Assigned to: Robert Oostenveld
Depends on:
See also:

Robert Oostenveld - 2011-12-01 22:36:27 +0100

Created attachment 196 headerfile from a netmeg data file which has neuromag306 data in it the sequence filename = '' hdr = ft_read_header(filename); cfg.grad = hdr.grad ft_layoutplot(cfg, []) results in creating layout from cfg.grad creating layout for unknown system the call to "ft_prepare_layout" took 1 seconds and an estimated 6 MB ??? Error using ==> text Invalid parameter/value pair arguments Error in ==> ft_plot_lay at 90 text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize); Error in ==> ft_layoutplot at 130 ft_plot_lay(lay, 'point', true, 'box', true, 'label', true, 'mask', true, 'outline', true); see attached mat file with the hdr structure.

Boris Reuderink - 2011-12-07 12:07:01 +0100

Is the file "" available on the mentat cluster? I can't find it in /home/common.

Boris Reuderink - 2012-01-03 11:59:26 +0100

Created attachment 207 Example that reproduces bug. Confirmed bug.

Robert Oostenveld - 2012-06-06 15:05:05 +0200

I am still able to reproduce the problem and figured out that it is due to the text function not working with x and y being specified as single precision. changing if label text(X+labeloffset, Y+(labeloffset*1.5), Lbl ,'fontsize',labelsize); end into if label % the text function fails if the position is specified in single precision X = double(X); Y = double(Y); text(X+labeloffset, Y+(labeloffset*1.5), Lbl ,'fontsize',labelsize); end solves the problem. manzana> svn commit Sending plotting/ft_plot_lay.m Transmitting file data . Committed revision 5916.

Robert Oostenveld - 2012-08-23 10:33:51 +0200

closed multiple bugs that have been resolved for some time