MathGroup Archive 2007

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

Search the Archive

Re: Drowing a vertical or horizontal line in a graphic

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77251] Re: Drowing a vertical or horizontal line in a graphic
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Wed, 6 Jun 2007 06:56:46 -0400 (EDT)
  • References: <f43h19$2sm$1@smc.vnet.net>

Hi.

You could try

In[88]:=
f[x_] = (x - 1)^2;
x /. Solve[D[f[x], x] == 0, x][[1]];
lin = Graphics[{Thickness[0.006], Dashing[{0.04, 0.04}], Orange,
Line[{{%, f[%]}, {%, f[2]}}]}];

In[91]:=
Show[{Block[{$DisplayFunction = Identity}, Plot[(x - 1)^2, {x, 0, 2},
Frame -> {True, True, False, False}]], lin}]

Cheers
Dimitris
 /  Vicent       :
> I am using Mathematica 5 and I have a simple question to ask you.
>
> I am drawing a function with "Plot" function.
>
> How can I add a vertical or horizontal line (or several ones) at a
> given position?
>
> For example, I want to draw   y = (x-1)^2, and also want a vertical
> line just at  x = 1,  in order to signal the point where that fuction
> gets its lower value.
>
> How can I do it?
>
> Thank you in advance.
>
> --
> Vicent



  • Prev by Date: Re: Strange behaviour in first example from Plot3D documentation
  • Next by Date: NDSolve Errors: icfail and ntdv
  • Previous by thread: Drowing a vertical or horizontal line in a graphic
  • Next by thread: Re: Drowing a vertical or horizontal line in a graphic