Answer by Alexey Popkov for Retrieving automatically-generated plot range
I can suggest the following Ticks hack:pl = Plot[Sin[x], {x, 0, 10}];Reap[Rasterize[Show[pl, Ticks -> {Sow[{##}] &, Sow[{##}] &}], ImageResolution -> 1]][[2, 1]]=> {{-0.208333,...
View ArticleAnswer by Chris Degnen for Retrieving automatically-generated plot range
Like acl I often dig into the FullForm with Position to post-process graphics:E.g. Finding and modifying PlotRange:p = Plot[Sin[x], {x, 0, 2 \[Pi]}, PlotRange -> Automatic];rpos = Position[p,...
View ArticleAnswer by kkm -still wary of SE promises for Retrieving...
Use the AbsoluteOptions function, q. v. in the docs.In[56]:= x = Plot[Sin[x], {x, 0, 2 \[Pi]}, PlotRange -> Automatic]; AbsoluteOptions[x, PlotRange]Out[57]= {PlotRange -> {{0., 6.28319}, {-1.,...
View ArticleAnswer by Mike Honeychurch for Retrieving automatically-generated plot range
p = Plot[Sin[x], {x, 0, 2*Pi}, PlotRange -> Automatic];AbsoluteOptions is a bit of a lottery but works in this caseAbsoluteOptions[p, PlotRange]{PlotRange -> {{0., 6.28319}, {-1., 1.}}}Even...
View ArticleAnswer by acl for Retrieving automatically-generated plot range
Not pretty or general, but you can brute-force it likes this:p = Plot[Sin[x], {x, 0, 2*Pi}, PlotRange -> Automatic];First@Cases[p, List[___, Rule[PlotRange, x_], ___] -> x]giving{{0., 6.28319},...
View ArticleRetrieving automatically-generated plot range
Is it possible to retrieve an automatically-generated plot range in Mathematica?For example, if I were to do:Plot[Sin[x], {x, 0, 2 \[Pi]}, PlotRange -> Automatic]then I'd like to know that the range...
View Article