I would like plot some data as areal map but not sure how to do it. Below is my script :
set view map
set title 'Depth in meters'
set style data pm3d
set style function pm3d
set palette
set xlabel "X coordinate"
set ylabel "Y Coordinate"
set pm3d at s
splot "data.txt" using 1:2:3 w pm3d
pause -1
It work if I changed the splot to splot "data.txt" using w points. I would like to see the Z axis as depth in color palette. Can anybody help to explain ? Thanks alot
ocb
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The script is mostly fine (although I'd try it without the empty "set palette"). The problem is most likely with your datafile. For pm3d to make an "area" out of your data, it needs for the data to describe a surface. For that, you have to give it the data in what gnuplot calls "grid structure". See "help splot data" and "help glossary".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I would like plot some data as areal map but not sure how to do it. Below is my script :
set view map
set title 'Depth in meters'
set style data pm3d
set style function pm3d
set palette
set xlabel "X coordinate"
set ylabel "Y Coordinate"
set pm3d at s
splot "data.txt" using 1:2:3 w pm3d
pause -1
data.txt:
230600.5 582483.9 8.70
230607.5 582466.6 8.40
230614.6 582449.3 4.40
230621.5 582432.0 5.70
230628.6 582414.8 -7.00
...
It work if I changed the splot to splot "data.txt" using w points. I would like to see the Z axis as depth in color palette. Can anybody help to explain ? Thanks alot
ocb
The script is mostly fine (although I'd try it without the empty "set palette"). The problem is most likely with your datafile. For pm3d to make an "area" out of your data, it needs for the data to describe a surface. For that, you have to give it the data in what gnuplot calls "grid structure". See "help splot data" and "help glossary".
Broeker,
Thanks a lot for the pointer. Found my answer.