0
votes

I have to plot the temperature map of a cross-section inside a cylinder for which I use this data. When I plot the data as a heat map in Gnuplot all I get is the following figure.enter image description here My heat map is supposed to be a quarter-circle. The coordinates in my data file correspond only to a quarter circle. But Gnuplot gives me a square. How do I get a quarter-circle heat map?

MWE

set pm3d map interpolate 0,0
set dgrid3d
splot 'Temp.dat' using 1:2:3
1

1 Answers

2
votes

dgrid3d can only make a rectangular grid, but that is not the main problem: The default algorithm of "dgrid3d" severely distorts your data. Use "splines" (or "qnorm" ?).

You have to do this in two steps:

set dgrid3d splines
set table $dat
splot dataf
unset table
unset dgrid3d

The interpolated grid is saved in the datablock $dat. You can now plot it with pm3d, and disable any point which is outside of your original dataset.

set pm3d map ....
splot $dat using 1:2:(($1**2+$2**2) > 16) ? 1/0 : $3)

(This needs gnuplot > 5.0. If you still have an older version, you have to use a temporary file instead of $dat.)