Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plot a single point

1,236 views
Skip to first unread message

Janice

unread,
Nov 28, 2001, 1:47:37 PM11/28/01
to
I'm running gnuplot through a pipe from a C++ program and would like to
have interactive plotting of data points (in 2D). i.e. Plot each point as it is
generated. Unfortunately, I can't seem to find a command to plot just
one point. The only way I have found is to output the single point to a
file, then plot the file. This seems slow and wasteful. Is there a
better way?

TIA,
Janice

Hans-Bernhard Broeker

unread,
Nov 30, 2001, 7:35:53 AM11/30/01
to
Janice <dev_nu...@yahoo.com> wrote:

> I'm running gnuplot through a pipe from a C++ program and would like
> to have interactive plotting of data points (in 2D). i.e. Plot each
> point as it is generated.

Gnuplot doesn't do incremental plots. For every time you want a plot,
all data going into that have to be available. You can work around
this using multiplot, but that makes it impossible to get hardcopies
via 'replot' so you may want to avoid that.

> Unfortunately, I can't seem to find a command to plot just one
> point.

plot '-' title 'one point' with points
1 2
E

For details, see 'help plot datafile special'
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Kevin

unread,
Sep 7, 2012, 9:55:04 AM9/7/12
to
There's a marginally better way. Gnuplot's `label` command can be used to generate a single point by setting the label text to '' and by setting a pointstyle for the label. e.g.,

set label 1 '' at 3.5,4.6 point pointtype 2

Would put a point with pointtype 2 (green x's in gnuplots wxt term) at 3.5 on the x axis, and 4.6 on the y axis.
(Sorry this is 11 years late, but I had the same question.)
0 new messages