[FieldTrip] no red color for ft_multiplotTFR

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Jun 4 10:10:58 CEST 2015


Dear Mante et al.,

While indeed you can simply revert to the 'jet' colormap using the
mentioned solutions, it's worth noting that rainbow colormaps (such as
jet) are considered suboptimal. The two most important arguments
against the use of such colormaps are (1) the luminance profile is
non-monotonic across the colormap, and (2) the colormap sometimes
suggests 'banding' even when the data is smooth. So, the new 'parula'
default is definitely an improvement over jet! (At least for
sequentially increasing/decreasing values. For data symmetric around
some point (e.g. 0) I would recommend neither 'parula' nor 'jet', but
a diverging colormap (see below).)

For more info, see these links:

https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/
http://www.mathworks.com/tagteam/81137_92238v00_RainbowColorMap_57312.pdf

Another good luminance-increasing colormap:
http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m

About diverging colormaps: http://www.sandia.gov/~kmorel/documents/ColorMaps/
And another example:
http://www.mathworks.com/matlabcentral/fileexchange/24870-fireice--hot-cold--colormap

A good link to understand colormaps and their luminance profile (the
link is from the Python library matplotlib, but the ideas apply to
Matlab as well of course): http://matplotlib.org/users/colormaps.html

Best,
Eelke

On 4 June 2015 at 08:21, Herring, J.D. (Jim) <j.herring at donders.ru.nl> wrote:
> Dear Mante,
>
>
>
> As a further clarification, if not specified in the configuration as
> mentioned by Joern, FieldTrip uses the default Matlab colormap which indeed
> is Parula (yellow-greenish) as opposed to Jet from MatLab 2014a onwards.
>
>
>
> Best,
>
>
>
> Jim
>
>
>
> From: fieldtrip-bounces at science.ru.nl
> [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig
> Sent: donderdag 4 juni 2015 8:57
>
>
> To: 'FieldTrip discussion list'
> Subject: Re: [FieldTrip] no red color for ft_multiplotTFR
>
>
>
> Dear Mante,
>
>
>
> most likely you are using a Matlab version >2014a. Mathwork changed the
> default colormap to Parula instead of Jet, see:
>
> http://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-matlab-part-1-introduction/
>
> You can change the colormap by using the ‘colormap’ command in Matlab, or if
> I recall correctly, also set cfg.colormap= ‘jet’ (which is doing the same
> within the ft_ function)
>
>
>
> Best,
>
> Jörn
>
>
>
> --
>
>
>
> Jörn M. Horschig, Software Engineer
>
> Artinis Medical Systems  |  +31 481 350 980
>
>
>
> From: fieldtrip-bounces at science.ru.nl
> [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of NIEUWLAND Mante
> Sent: Wednesday, June 3, 2015 10:38 PM
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] no red color for ft_multiplotTFR
>
>
>
> Dear all,
>
>
>
> I’m new to Fieldtrip, so I hope this question isn’t too stupid :-D. I could
> not find anything relevant on the previous threads.
>
>
>
> When I use the multiplotTFR function (example code pasted below), the hot
> color is always yellow and never red, even if I set the zlim to extremely
> small values).
>
>
>
> I am using fieldtrip-20150504. What am I doing wrong? I thought the red-blue
> hot-cold colors were standard. Any help is really appreciated!
>
>
>
> Cheers,
>
> Mante
>
>
>
>
>
>
>
> cfg = [];
>
> cfg.layout      = 'config/biosemi64.lay';
>
> cfg.channel = 'all';
>
> cfg.baseline = 'no';
>
> cfg.xlim = [0 2];%[-0.5 1.5];%
>
> cfg.ylim = [30 100];
>
> cfg.zlim = [-0.1 0.1];
>
> cfg.interactive = 'yes';
>
> cfg.showlabels    = 'yes';
>
> cfg.colorbar = 'yes';
>
>
>
> figure;
>
> ft_multiplotTFR(cfg, grandavg_hi_131_132);
>
>




More information about the fieldtrip mailing list