0
$\begingroup$

This question already has an answer here:

For example, let's say I'm plotting this function, Plot[x, {x,-3,2}]. From the answer to this question the plot range is {{-3,2},{-3,2}}, as expected. However, the coordinate plane clearly extends beyond this range, which you can see if you set Frame->True. Is there a way to determine the true dimensions of the plotting window? Something along the lines of calling the dimensions of the frame in the units used by the axes?

If I were to eyeball it, it looks like there are margins of about 0.1 in the horizontal direction and between 0.28 and 0.3 in the vertical direction. This would make the dimensions approximately 5.2x5.6, so the plot takes up around 85% of the total space allotted for the plot.

$\endgroup$

marked as duplicate by Kuba, Community May 14 '15 at 16:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Is PlotRangePadding what you are after? $\endgroup$ – Kuba May 14 '15 at 16:31
  • $\begingroup$ I could certainly work with that, but that's not quite what I was looking for. I'm more interested in the dimensions of the space that PlotRangePadding removes. $\endgroup$ – user170231 May 14 '15 at 16:34
  • 1
    $\begingroup$ I linked a topic I think answers your question together with documentation. Take a look at pages for relevant options, PlotRangePadding gives 4% more range. $\endgroup$ – Kuba May 14 '15 at 16:41
  • $\begingroup$ Thank you, I had a feeling that all plots would have a uniform amount of "fluff". $\endgroup$ – user170231 May 14 '15 at 16:45
1
$\begingroup$
myPlot = Plot[x, {x, -3, 2}];

AbsoluteOptions[myPlot, {PlotRange, PlotRangePadding}]

{PlotRange -> {{-3., 2.}, {-3., 2.}},

PlotRangePadding -> {{Scaled[0.02], Scaled[0.02]}, {Scaled[0.05], Scaled[0.05]}}}

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.