MathGroup Archive 1998

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

Search the Archive

Re: Plotting a Vertical Line


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11676] Re: Plotting a Vertical Line
  • From: "Stephen P Luttrell" <luttrell@signal.dra.hmg.gb>
  • Date: Sat, 21 Mar 1998 18:35:12 -0500
  • Organization: Defence Evaluation and Research Agency
  • References: <6esdkf$57j@smc.vnet.net>

>How do I get Mathematica to plot the graph of x = 3, i.e., a vertical
>line in 2D?  Thanks.


You can plot the locus defined by f[x,y]==f0 using ImplicitPlot.

The following code solves your problem (and, by analogy, more general
problems like it):

Needs["Graphics`ImplicitPlot`"];
ImplicitPlot[x==2,{x,0,4},{y,-2,2}];

Alternatively, if all you need is to draw a vertical line, then you
could do something like this:

Show[Graphics[Line[{{2,-2},{2,2}}]]]

==============================================================

Stephen P Luttrell
luttrell@signal.dra.hmg.gb
Adaptive Systems Theory                           01684-894046 (phone)
Room EX21, DERA                                    01684-894384 (fax)
Malvern, Worcs, WR14 3PS, U.K.
http://www.dra.hmg.gb/cis5pip/Welcome.html




  • Prev by Date: Re: Plotting a Vertical Line
  • Next by Date: Re: Question: inequalities
  • Prev by thread: Re: Plotting a Vertical Line
  • Next by thread: Re: Plotting a Vertical Line