From: Bill Rowe <readn...@sbcglobal.net>
Date: 7月4日, 下午6時10分
Subject: Is it possible to query current plot range values (or have
To: comp.soft-sys.math.mathematica
On 7/4/10 at 3:10 AM, dnqu...@gmail.com (Leo Alekseyev) wrote:
>Some of my plots contain vertical lines for alignment. To make sure
>the lines extend from the top to the bottom of the plot frame, I
>typically give those lines large values for +y and -y coordinates.
>This has an unfortunate side effect that the directive
>PlotRange->All now considers my line to be a part of the plot, and
>rescales the plot range to display it in its entirety. Is there a
>way to (a) either make PlotRange->All ignore this line somehow or
>(b) set the +y and -y coordinates of the line to match the current
>plot range?..
Here are two ways to place a vertical line on a plot without using
large coordinate values for y:
Plot[Cosh[x], {x, -5, 5},
Epilog -> {Red, Line@{Scaled@{.8, 0}, Scaled@{.8, 1}}}]
or
Plot[Cosh[x], {x, -5, 5}, GridLinesStyle -> Red,
GridLines -> {{3}, None}]
沒有留言:
張貼留言