0
votes

I have a huge data file with three columns " X Y data" about 60000 rows without any space between them. The values are in the raster pattern. For example in a square of 1cm side the data file will look like

0.0 0.0 7.8

0.2 0.0 5.2

0.4 0.0 6.7

0.6 0.0 7.5

0.8 0.0 7.8

1.0 0.0 5.6

1.0 0.2 6.2

0.8 0.2 4.5

0.6 0.2 4.8

. . . . . . .

1.0 1.0 8.9

I want to plot a heat map for this. I tried using http://gnuplot.sourceforge.net/demo/heatmaps.html Gnuplot heatmap XYZ but I was not able to do it. Does anyone have a clue how to proceed with it? Any help will be appreciated.

1

1 Answers

0
votes

The link doesn't work...

Your data sample doesn't look like "raster pattern". For me raster pattern (1 x 0.2) means:

0.0 0.0 data
0.0 0.2 data
0.0 0.4 data
0.0 0.6 data
0.0 0.8 data
0.0 1.0 data

0.2 0.0 data
0.2 0.2 data
0.2 0.4 data
0.2 0.6 data
0.2 0.8 data
0.2 1.0 data

...

If you have this data form with each line separated by empty line, see above, you can plot them by

set view map
unset surface
set pm3d at b
set size ration -1 #not necessary
unset key #not necessary
splot "data.dat" u 1:2:3 with pm3d

For creating the datafile you can use some sorting programs like sort and then add empty line every lines.

I'm using this procedure upto 1e6 points without much problems. For testing I can recommend you to use keyword every.