Back to the main page.

Bug 2876 - ft_singleplotTFR only uses first 64 entries in colormap

Status CLOSED FIXED
Reported 2015-04-02 17:24:00 +0200
Modified 2016-01-15 09:38:29 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Jens Klinzing - 2015-04-02 17:24:50 +0200

When using masking with maskstyle='saturation', ft_singleplotTFR uses only the first 64 values of cfg.colormap. The bug does not occur if no masking is used, or masking with 'opacity' is used. Testdata (tfr) is here: https://www.dropbox.com/s/t3v6ejy6zxls2nq/tfr.mat?dl=0 Just run the following code on it: cfg = []; cfg.colormap = jet(128); % jet(64) works just fine cfg.xlim = [-1.2 1.2]; cfg.ylim = [5 20]; cfg.zlim = [-0.91 0.91]; cfg.maskstyle = 'saturation'; % 'opacity' works just fine cfg.maskalpha = 0.2; cfg.maskparameter = 'mask'; ft_singleplotTFR(cfg,tfr) I used the latest fieldtrip version on a Windows 7 computer with Matlab 2013a and Matlab 2014b.


Jan-Mathijs Schoffelen - 2015-09-11 13:47:59 +0200

Could this be because the low level plotting code (e.g. ft_plot_matrix, which is relevant here), has a hard coded 64 on line 224 (and a 32 on line 228).


Jan-Mathijs Schoffelen - 2015-09-14 09:47:56 +0200

added optional ncolors in lower-level functions ft_plot_topo and ft_plot_matrix in revision 10665


Jan-Mathijs Schoffelen - 2015-09-14 09:53:59 +0200

added support in high level functions: ft_multplotTFR.m and ft_singleplotTFR, and private/topoplot_common.m in revision 10666