I’m using gnuplot to make a colour-map. What I need is, when I set a palette I need to define the ranges and colours such that certain ranges have the same colour.
For example, say the third column of the data ranges from 100 to 150. I need 100 to 120 to be same colour, then 120 to 130 same colour. I tried doing it this way
set palette defined (100:120 "gray", 121:129 "blue", 130:150 "dark-gray")
But it gnuplot says this is invalid expression, specifically pointing at the ” : “.
Is there any way around this?
check out
set palette maxcolors. From the help page:Also note that you should be able to do something like:
but be careful — the numbers 100, 120, 121, 129, etc don’t correspond to the values on your colorbar unless you
set cbrange [100:129](for example).