Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Is it possible to query current plot range values (or have

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110751] Re: Is it possible to query current plot range values (or have
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 4 Jul 2010 06:10:29 -0400 (EDT)

On 7/4/10 at 3:10 AM, dnquark at 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 at {.8, 1}}}]

or

Plot[Cosh[x], {x, -5, 5}, GridLinesStyle -> Red,
 GridLines -> {{3}, None}]



  • Prev by Date: JLink NaN Support
  • Next by Date: Re: Is it possible to query current plot range values (or have
  • Previous by thread: Is it possible to query current plot range values (or have
  • Next by thread: Re: Is it possible to query current plot range values (or have