Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Is it possible to query current plot range values (or have
Replies: 4   Last Post: Jul 5, 2010 6:02 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Daniel Huber

Posts: 7
Registered: 6/16/10
Re: Is it possible to query current plot range values (or have
Posted: Jul 4, 2010 6:10 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 04.07.2010 09:10, 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?..
>
> Thanks in advance to anyone who might clarify this...
> --Leo
>

Hi Leo,
you may use scaled coordinates that run from 0..1:
Plot[Sin[x], {x, 0, 10},
Epilog -> {Line[{Scaled@{0.5, 0}, Scaled@{0.5, 1}}]}]
Note that you must also give the x coordinate in the 0..1 scale.
cheers, Daniel




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.