Re: Drowing a vertical or horizontal line in a graphic
- To: mathgroup at smc.vnet.net
- Subject: [mg77332] Re: [mg77196] Drowing a vertical or horizontal line in a graphic
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 7 Jun 2007 03:38:26 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Plot[(x - 1)^2, {x, 0, 2},
Epilog -> {Red, Line[{{1, -1}, {1, 2}}]}]
Note that the line is automatically cropped.
Bob Hanlon
---- Vicent <vginer at gmail.com> wrote:
> 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
>
>