# 自定义Gnuplot中的颜色范围

Rod_Algonquin

---- 300

---- 100

---- 70

---- 30

---- 10

---- 1

---- 0

``````set cbtics ('300' 300, '100' 100, '30' 30, '10' 10, '1' 1, '0.5' 0.5, '0.1' 0.1, '0.01' 0.01, '0' 0);
set palette defined (0.1 "#4CAF4F",0.3 "#65B443",0.5 "#7FBA38",0.7 "#98BF2D",0.9 "#B2C521",1.0 "#CBCA16",2 "#E5D00B",3 "#FFD600",4 "#FFC400",5 "#FFB300",6 "#FFA100",7 "#FF9000",8 "#FF7E00",10 "#FF6D00",30 "#F85A00",50 "#F14800",70 "#EA3600",90 "#E32400",100 "#DC1200",300 "#D50000")
``````

``````rescale(x) = ( x >= 0. && x < 1. ? x : \
x >= 1. && x < 10. ? 1.+(x-1.)/(10.-1.) : \
x >= 10. && x < 30. ? 2.+(x-10.)/(30.-10.) : \
x >= 30. && x < 70. ? 3.+(x-30.)/(70.-30.) : \
x >= 70. && x < 100. ? 4.+(x-70.)/(100.-70.) : \
x >= 100. && x < 300. ? 5.+(x-100.)/(300.-100.) : \
1/0)
set cbrange [0:6]
set cbtics ("0" 0, "1" 1, "10" 2, "30" 3, "70" 4, "100" 5, "300" 6)
set pm3d
splot rescale(x**2+y**2)
``````

``````set palette maxcolors 6
``````

``````set ztics ("0" 0, "1" 1, "10" 2, "30" 3, "70" 4, "100" 5, "300" 6)
``````

0条评论