I am trying to make a 3D color plot with pm3d in Gnuplot. It is heatmap for a heat transfer problem in a cube. So, I have 4 columns in my data file: x, z, t and T which are respectively the horizontal coordinate, the vertical coordinate,the current time in the simulation (always t = 0 s, here) and the temperature. I want to plot the variation of temperature with x and z in 3D.
When I do it with Gnuplot,
set size square
set xlabel("x")
set ylabel("z")
set zlabel("T")
set xrange [-0.01:1.01]
set yrange [-0.01:1.01]
set hidden3d
set palette rgb 33,13,10
set pm3d implicit at s
splot "para_heat_3D_inta.dat" using 1:2:4 with pm3d notitle
pause mouse keypress" | gnuplot -persist
I see that the highest temperature (373 °K) is not correctly represented according to the colorbar. Indeed, at every z = 0 or z = 1, it must be T = 373 °K as it is in my data file.
My data file looks like:
x z t T
0.000 0.000 0.000 373.000
0.000 0.005 0.000 298.000
.....
0.000 0.985 0.000 298.000
0.000 0.995 0.000 298.000
0.000 1.000 0.000 373.000
0.005 0.000 0.000 373.000
0.005 0.005 0.000 283.000
....
0.005 0.995 0.000 283.000
0.005 1.000 0.000 373.000
0.015 0.000 0.000 373.000
0.015 0.005 0.000 283.000
....
0.015 0.995 0.000 283.000
0.015 1.000 0.000 373.000
The colorbar shows a red color for this temperature level, however, my plot displays it in light green although the surface reaches the correct hight... Here is my Graphic:
I have made several pieces of research on the net, but not find anything. Maybe someone could help me with this?
Thanks in advance.
I guess the short answer (without illustrative example) is:
set pm3d corners2color max
Check help pm3d
.