Jet is dead

Posted on

Jet is dead, long live parula! The criticism of MATLAB’s former default colormap is all around. Jet is perceptually non-uniform. Our brains tend to detect changes between particular kinds of colors better than the transition between others. The colormap jet is thus misguiding, it accentuates parts of your data and thus misrepresents it.

I have to admit that I used jet for quite a while. And it was the default colormap of imageschs, one of the core visualization tools in TopoToolbox. These days are over now. The default colormap is now parula which you’ll find in the folder colormaps. In addition, you’ll find other colormaps:

– landcolor
– flowcolor
– magmacolor
– and a whole bunch of terrain coloring maps in ttcmap

And the good thing: Now you can have multiple colormaps in one figure…

DEM = GRIDobj('srtm_bigtujunga30m_utm11.tif');
subplot(2,2,1);
imageschs(DEM,[],'colormap','landcolor','ticklabels','nice')
title('DEM - landcolor')
subplot(2,2,2);
G = gradient8(DEM);
imageschs(DEM,G,'colormap',flipud(magmacolor(255)),'ticklabels','nice')
title('Gradient - magmacolor')
subplot(2,2,3);
FD = FLOWobj(DEM);
A  = flowacc(FD);
A  = dilate(A,ones(5));
imageschs(DEM,sqrt(A),'colormap','flowcolor','ticklabels','nice')
title('Flow accumulation - flowcolor')
subplot(2,2,4)
[clr,lims] = ttcmap(DEM,'cmap','gmtglobe');
imageschs(DEM,[],'colormap',clr,'caxis',lims,'ticklabels','nice')
title('DEM - gmtglobe')

 

colormaps.png

Of course, you can use all kinds of colormaps with imageschs such as hot, spring, etc. If you use custom colormaps, remember that

  • imageschs requires colormaps with less than or equal 256 colors or 255 if there are nans in the data.
  • you can easily flip colormaps, e.g. flipud(gray(255)).
  • you can easily build your own colormaps using colormapeditor.

Do you have a favourite colormap that you want to share with others and that should be included in a future release of TopoToolbox. TopoToolbox could need a bipolar colormap for displaying curvature, for example.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.