MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

how to draw a vertical line

  • To: mathgroup at
  • Subject: [mg26056] how to draw a vertical line
  • From: Robert Tartarin <tartarin at>
  • Date: Sat, 18 Nov 2000 23:08:11 -0500 (EST)
  • Sender: owner-wri-mathgroup at

How to draw a vertical line ?
[question from lysov at]

I had the same problem and never quite understood why Wolfram did not
provide a clean solution within the Plot [ ] functions.

I know 3 solutions for a vertical line with x* as abcisse:

* Plot [ { {x*, maxyvalue}, {x*,minyvalue}}, {xdomain} ] .
This is obvious. Meanwhile, very often,  it is necessary to define
maxyvalue and minyvalue according to the values of some other function on
the domain. Easy but heavy.

*  Graphics [ Line [ { {x*, maxyvalue}, {x*,minyvalue} } ]  and Show [ ]
,often combined with  some other Plot command.
Same solution as above since Plot is converted into the Graphics primitive.

* Plot [ yfunction [x], {xdomain}, Gridlines - > { {x*} , None} ]
Here the Gridlines option is used as a bypass to draw a vertical line at
x*.  You can easily plot a vertical (or several) and some other function
within a single Plot command. More important you don't need to define the
end points of the vertical since they are automatically adjusted by the
Gridlines option.

Robert Tartarin

Professor in Economics
(University of Nantes, France)

Robert Tartarin
5 place R. Salengro
44000 Nantes
02 40 48 47 77

  • Prev by Date: Re: Re: NDSolve help needed for nonlinear eq.
  • Next by Date: Simplifying things
  • Previous by thread: how to draw a vertical line
  • Next by thread: Re: how to draw a vertical line