Gnuplot-Set colorbar Maxima and Minima

拟墨画扇 提交于 2019-12-31 02:26:27

问题


I am plotting heatmap of this data using the following code

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

And I get a result like this I would like to set the colormap maxima and minima manually. This is because I have to plot other plots where temperature can go upto 1000 C. So I don't want red colour indicating 300 C in one plot and 1000 C in another plot. How do I do this Gnuplot?


回答1:


I found the solution: use the following command

set cbrange [MIN:MAX]

Where MIN and MAX should be the minimum and maximum value that you want to specify to the colorbar



来源:https://stackoverflow.com/questions/37745891/gnuplot-set-colorbar-maxima-and-minima

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!