 
 
 
 
 
 
how to draw a vertical line
- To: mathgroup at smc.vnet.net
- Subject: [mg26056] how to draw a vertical line
- From: Robert Tartarin <tartarin at zeus.sc-eco.univ-nantes.fr>
- Date: Sat, 18 Nov 2000 23:08:11 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
How to draw a vertical line ?
[question from lysov at paloma.spbu.ru]
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

