Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gnuplot-Set colorbar Maxima and Minima

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 thisheatmap 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?

like image 878
Rhinocerotidae Avatar asked Jun 10 '16 10:06

Rhinocerotidae


1 Answers

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

like image 149
Rhinocerotidae Avatar answered Oct 06 '22 11:10

Rhinocerotidae