Reputation: 21
I'm trying to generate a heat map from data (https://pastebin.com/AgivvGgX). The data are not in the "matrix" form.
I tried to use pm3d map
and I obtained the following plot:
I also tried to use dgrid3d
and view map
:
set view map
set pal def
set dgrid3d 40,40,3
splot "plot.dat" using 1:2:3 u pm3d
And I obtained the following result:
Both the plots are not correct. The dgird3d
keyword creates artifacts where there are not data points.
I obtained a nice plot using the code:
set view map
set pal def
splot "plot.dat" using 1:2:3 with points pointtype 5 pointsize 1 palette linewidth 8
I would like to obtain a map similar to the latter one, but not with discrete points or squares but as a continuous heat map and have a white background where data are not present. Is it possible?
Upvotes: 2
Views: 567
Reputation: 5335
Since your data is irregular, you should use dgrid3d
. It has various options (see help dgrid3d
), here is a picture I've got while trying different kernels and options:
set view map
set palette defined (0 'white', 1 'blue', 2 'green', 3 'yellow', 4 'red')
set dgrid3d 100,100 exp kdensity 10,10
splot 'plot.dat' w pm3d palette
set dgrid3d 100,100 gauss kdensity 30,30
replot
Upvotes: 2