Gnuplot question: plotting 3D data in map view

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this:

  • map view (no 3D view)
  • color of each point should depend on z-value.
  • I want to define my own color scale
  • plot should contain a little legend box in the form of a color bar listing what z-value corresponds to what color

I tried pm3d, but it seems it only handles gridded data, i.e. x,y's on a regular grid, or at least displays them as such. I just want to see the individual points (no interpolation).

Thanks for your help here.

I found a partial answer myself. Suppose the xyz points are in the file "file.xyz". The following gnuplot commands will then produce a map with the points colored by z-value:

set pm3d
set palette rgb 33,13,10
set view map
splot 'file.xyz' with points palette pt 5 ps 0.5

Some explanation:

  • set pm3d activates a package that allows coloring points by value;
  • the palette command will create a much used color scale: blue-green-yellow-red;
  • set view map will disable 3d view, but show a map view instead;
  • splot plots the points in the file;
  • "pt 5" specifies pointtype 5, meaning a triangle;
  • "ps 0.5" specifies pointsize 0.5, meaning so small that it almost looks like a filled dot.

The only problem with this command is that it does not seem possible to produce filled symbols. All symbol types are open symbols. Also, each time you need to enter the splot command with all the specified options, which is a bit cumbersome in case you just want to make a quick plot.

If anyone knows how to make all these settings the default ones, or how to create a function/macro that does it, that would be appreciated.