Gnuplot-Set colorbar Maxima和Minima

问题描述 投票:3回答:1

我正在使用以下代码绘制此data的热图

reset 
set terminal pngcairo size 800,800
set output 'Temp.png'
#set terminal tikz
#set output 'Temp.tex'
set lmargin at screen 0.05
set rmargin at screen 0.85
set bmargin at screen 0.1
set tmargin at screen 0.9
set palette defined ( 0 '#000090',\
                      1 '#000fff',\
                      2 '#0090ff',\
                      3 '#0fffee',\
                      4 '#90ff70',\
                      5 '#ffee00',\
                      6 '#ff7000',\
                      7 '#ee0000',\
                      8 '#7f0000')
set pm3d map interpolate 20,20
unset key
set multiplot

# plot the heatmap
splot '2m_p2_f36.txt' using 1:2:3

unset multiplot
unset output

我得到像thisheatmap这样的结果我想手动设置colormap maxima和minima。这是因为我必须绘制温度可以达到1000℃的其他图。所以我不希望红色表示一个图中的300 C和另一个图中的1000 C.我怎么做这个Gnuplot?

gnuplot colorbar
1个回答
3
投票

我找到了解决方案:使用以下命令

set cbrange [MIN:MAX]

其中MIN和MAX应该是您要为颜色条指定的最小值和最大值

© www.soinside.com 2019 - 2024. All rights reserved.