2
votes

I would like to have a color bar divided into 5 colors. One color from 0 to 95, another until 97, then 99, 99.8 and 100.

What I have done so far is:

set palette maxcolors 5
set palette defined ( 0 "cyan", 95 "green", 97 "yellow", 99 "orange", 99.8 "red")

But this just divides the range of 0 to 100 in 5 equal ranges with the colors above

Do you have suggestions?

1

1 Answers

2
votes

This would solve the problem. It will create ticks on the colorbar at 0, 95, 97, 99, 99.8 and 100 and set the colors cyan green yellow, orange and red for the corresponding intervals.

set cbtics ("0" 0, "95" 95, "97" 97, "99" 99, "99.8" 99.8, "100" 100)

set palette defined ( 0 "cyan", 95 "cyan", 95 "green", 97 "green",97 "yellow", 99"yellow", 99"orange", 99.8"orange", 99.8"red", 100 "red" )

set pm3d map

Hope it will be of help for somebody.