I hope this is the right place for my question, if not, please redirect me! I'm trying to make a heatmap out of grided data, but i don't get it just like I want it so here it goes. If the z-value is 0 I want the corresponding square to be white, otherwise different shades of blue, this is important since I need to know if there was any data or not in a point, for this I have created palette functions which seems to be working. My code looks like this:
set cbrange [0:100]
set palette functions red(gray),green(gray),blue(gray)
set cblabel "Percentage"
set xlabel "Test time, [%]"
set ylabel "Time, [100 ms]"
set pm3d map
splot "hm_matrix_file.dat" matrix with image
and hm_matrix_file.dat contains dummy data:
99 50 1
0 0 0
1 1 1
1 50 99
When I run the script the colors are showing as expected, but each square is centered around 0, 1, 2 and so on, which makes the plot kind of uggly, instead i would like the squares from 0-1, 1-2, 2-3, etc. One way to accomplish this is to remove the "with image" option to splot, but then the colors are not right any more. Seems like gnuplot does some sort of interpolation and the zeros are not visible as white anymore, likewise the 99 is not as distinct as it should be.
Any help is apprecieated!