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

Plotting vertical line on plot

5,499 views
Skip to first unread message

Julia Bell

unread,
Sep 26, 2001, 10:45:46 AM9/26/01
to
Using gnuplot 3.7

I can plot a horizontal line on a 2-d plot using a command of the form
plot [0:10] 20 notitle with line 1
(where the x axis ranges from 0 to 10, and I want the line placed at a
yaxis value of 20).

But, I can't find a way to plot a vertical bar:
plot 0 [10:20] notitle with line 1
doesn't work.

I understand this mathematically is a multi-valued quantity, not a
function, so maybe that's why it doesn't work.

Is there any way to do this other than creating a datafile as
0 10
0 20
and plotting the file?

Thanks,

Julia Bell


Hans-Bernhard Broeker

unread,
Sep 26, 2001, 11:24:57 AM9/26/01
to
Julia Bell <julia...@jpl.nasa.gov> wrote:

> But, I can't find a way to plot a vertical bar:
> plot 0 [10:20] notitle with line 1
> doesn't work.

But

set parametric
plot [10:20] 0, t notitle w l 1

would.

Or you could add it to an existing plot like this:

set arrow from 0,10 to 0,20 nohead

--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Georg Wittig

unread,
Sep 27, 2001, 6:24:45 AM9/27/01
to
Julia Bell <julia...@jpl.nasa.gov> writes:

>But, I can't find a way to plot a vertical bar:
>plot 0 [10:20] notitle with line 1
>doesn't work.


gnuplot> plot '-' w l 1
0 10
0 20
e
gnuplot>

--
Georg Wittig, FhG Georg....@gmd.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]

0 new messages