MATLAB: How to get the size or position of the plot box within a figure window

aspect ratiofigure sizeMATLAB

After much effort, I am still struggling to find the command to get the size or position of the plot box (i.e. the white box) within a figure window. What I really need is the aspect ratio of this white box, but a size or position command would get me there. I've tried variations of 'Position', 'PlotBoxAspectRatio', 'pbaspect',and 'DataAspectRatio' without luck.
For example, if I run the following command,
plot(1:100,1:100,'linewidth',5)
I want to know about the physical size/shape of the white box ONLY, not the grey box:
.
Thanks!
Paul

Best Answer

h =figure;
axesHandles = findall(h,'type','axes');
get(axesHandles,'position')
Related Question