Discussion:
Overlaying points onto a pm3d map?
(too old to reply)
Heraklit
2004-01-30 00:04:09 UTC
Permalink
Dear all,

do you know of a way to overlay a scatter plot (i.e. separate points,
or "dots" as from a plot command) onto a pm3d map surface?

I'd appreciate any hints how this might be possible.

Kind regards, Andreas
Petr Mikulik
2004-01-30 08:04:38 UTC
Permalink
Post by Heraklit
do you know of a way to overlay a scatter plot (i.e. separate points,
or "dots" as from a plot command) onto a pm3d map surface?
I'd appreciate any hints how this might be possible.
gnuplot> set pm3d explicit
gnuplot> splot x with pm3d, x*y with points

---
Petr Mikulik
Andreas K. Huettel
2004-01-30 12:50:39 UTC
Permalink
Dear Mr Mikulik,

thanks for your advice, a little modification is necessary in my case.

Terminal type set to 'x11'
gnuplot> set pm3d explicit
gnuplot> splot "kamel.data2" with pm3d
gnuplot> splot "kamel.data2" with pm3d, "kamel-oben-peakpos.data" with
points
^
2 columns only possible with explicit pm3d style (line 1)

gnuplot>

The first file ("kamel.data2") plots fine with pm3d map and so on; the
second file ("kamel-oben-peakpos.data") has two data columns (x,y).

However, as soon as I create an "artificial column", everything works
fine!

gnuplot> splot "kamel.data2" with pm3d, "kamel-oben-peakpos.data" using 1:2:(0) with points

:-)

Thanks!
Andreas


On Fri, 30 Jan 2004, Petr Mikulik wrote:

#]From: Petr Mikulik <***@physics.muni.cz>
#]To: Heraklit <***@akhuettel.de>
#]Newsgroups: comp.graphics.apps.gnuplot
#]Date: Fri, 30 Jan 2004 09:04:38 +0100 (CET)
#]Subject: Re: Overlaying points onto a pm3d map?
#]
#]> do you know of a way to overlay a scatter plot (i.e. separate points,
#]> or "dots" as from a plot command) onto a pm3d map surface?
#]>
#]> I'd appreciate any hints how this might be possible.
#]
#]gnuplot> set pm3d explicit
#]gnuplot> splot x with pm3d, x*y with points
#]
#]---
#]Petr Mikulik
#]
Theo Hopman
2004-01-30 14:36:05 UTC
Permalink
Post by Heraklit
Dear all,
do you know of a way to overlay a scatter plot (i.e. separate points,
or "dots" as from a plot command) onto a pm3d map surface?
I'd appreciate any hints how this might be possible.
Since you're using pm3d, I'll assume you have access to a reasonably
recent development version. The following works here with version
3.8k.0:

hyp(x,y)=sqrt(x*x+y*y)
sinc(x)=sin(x)/x # example functions
set samples 50
set isosamples 50 # for nice detailed surface
set pm3d explicit
set view map
splot sinc(hyp(x,y)) with pm3d, sinc(hyp(x,y)) with points

Note the importance of the order in which the functions/data sets are
given in the `splot` command: they're drawn in the order given, so for
the points to be visible, the pm3d surface should be given first.

THeo

Loading...