Re: Re: Drowing a vertical or horizontal line in a graphic
- To: mathgroup at smc.vnet.net
- Subject: [mg77389] Re: [mg77251] Re: Drowing a vertical or horizontal line in a graphic
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Thu, 7 Jun 2007 04:08:15 -0400 (EDT)
- Organization: Deep Space Corps of Engineers
- References: <f43h19$2sm$1@smc.vnet.net> <14706435.1181133366418.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
In version 6, that could be
f[x_] = (x - 1)^2;
x /. Solve[D[f[x], x] == 0, x][[1]];
Show[Graphics[{Thickness[0.006], Dashing[{0.04, 0.04}], Orange,
Line[{{%, f[%]}, {%, f[2]}}]}],
Plot[(x - 1)^2, {x, 0, 2}, Frame -> {True, True, False, False}]]
Bobby
On Wed, 06 Jun 2007 05:56:46 -0500, dimitris <dimmechan at yahoo.com> wrote=
:
> 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 fucti=
on
>> gets its lower value.
>>
>> How can I do it?
>>
>> Thank you in advance.
>>
>> --
>> Vicent
>
>
>
-- =
DrMajorBob at bigfoot.com