Quantcast
Channel: colormap – Gnuplotting
Viewing all articles
Browse latest Browse all 11

Matlab colorbar parula with gnuplot

$
0
0

Some time ago I discussed how to get the jet colormap from Matlab in gnuplot. Since Matlab R2014b jet is no longer the default colormap. Now parula is the new default colormap. It was introduced together with new default line colors.

The changes in the default colormap address some of the points that were criticized of jet by Moreland and corrected by his colormap.

Matlab parula colormap

Fig. 1 Photoluminescence yield plotted with the parula colormap from Matlab (code to produce this figure, parula.pal, data)

A colormap similar to the original is stored in the parula.pal file, which is also part of the gnuplot-palettes repository on github. An example application of the colormap is presented in Fig. 1.

In order to apply the colormap you can simply load the file.

load 'parula.pal'

The parula.pal file also includes definitions of line styles. The first line styles (1-9) corresponds to the colors of the parula palette, the line styles 11-17 correspond to the new Matlab line colors, see Fig. 2.

Bessel functions

Fig. 2 Bessel functions from order zero up to six plotted with the new default Matlab line colors. (code to produce this figure, parula.pal, data)

set style line 11 lt 1 lc rgb '#0072bd' # blue
set style line 12 lt 1 lc rgb '#d95319' # orange
set style line 13 lt 1 lc rgb '#edb120' # yellow
set style line 14 lt 1 lc rgb '#7e2f8e' # purple
set style line 15 lt 1 lc rgb '#77ac30' # green
set style line 16 lt 1 lc rgb '#4dbeee' # light-blue
set style line 17 lt 1 lc rgb '#a2142f' # red

If you want to use only the palette and not the line colors, you should remove them from the parula.pal file.


Viewing all articles
Browse latest Browse all 11

Trending Articles