Re: Detect automatically chosen value for PlotRange in
- To: mathgroup at smc.vnet.net
- Subject: [mg105823] Re: [mg105793] Detect automatically chosen value for PlotRange in
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 20 Dec 2009 06:56:07 -0500 (EST)
- Reply-to: hanlonr at cox.net
Show[{p = Plot[0, {x, -5, 5}],
Graphics[{Red,
Arrow[{{#, 0}, {#, 1}}] & /@
Range @@
First[PlotRange /.
AbsoluteOptions[p, PlotRange]]}]}]
Bob Hanlon
---- Chris Rodgers <see-rodgers-org-uk-for-contact-details at invalid.gg> wrote:
=============
Hi,
I want to add some arrows to a plot, like this:
Plot[0, {x, -5, 5},
Epilog -> {Red, Arrow[{{#, 0}, {#, 1}}] & /@ Range[-10, 500]}]
When plotting more complicated functions, can I detect inside Epilog
what value Mathematica chose for the PlotRange?
I looked at AbsoluteOptions[...], but I don't know how to get the handle
for the currently plotting graphics object.
My aim is to restrict my arrow drawing so that I only attempt to draw
arrows that will actually appear in the plot. I hope this will speed
things up.
Thanks,
Chris.
--
Bob Hanlon