Search code examples
colorsgnuplotpalette

GNUPLOT: How to set reverse HOT color palette


Here is the example in http://gnuplot.sourceforge.net/demo/pm3dcolors.html

set palette rgb 21,22,23; set title "hot (black-red-yellow-white)";

The above code set the hot palette. However I want a reversed hot palette, say:

white-yellow-red-black.

Small least value map to white and largest value map to black.


Solution

  • Use negative numbers to invert the palette:

    set pm3d map
    set palette rgb 21,22,23
    splot x
    

    gives you

    enter image description here

    whereas

    set pm3d map
    set palette rgb -21,-22,-23
    splot x
    

    gives you

    enter image description here