2

我想要一个分为 5 种颜色的颜色条。一种颜色从 0 到 95,另一种颜色到 97,然后是 99、99.8 和 100。

到目前为止我所做的是:

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

但这只是将 0 到 100 的范围划分为 5 个相等的范围,上面的颜色

你有什么建议吗?

4

1 回答 1

2

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.

于 2013-02-26T16:30:41.937 回答