MATLAB: Getpixelposition vs OuterPosition of figure

figureMATLAB

I'm getting different values from getpixelposition and the OuterPosition of the figure …
get(gcf,'OuterPosition')
ans =
3062 537 2201 801
>> getpixelposition(gcf)
ans =
3070 545 2185 708
>> get(gcf,'Position')
ans =
3070 545 2185 708
What gives? Why is there an 8 pixel discrepancy on each side?
Edit: I added 'Position' to show that this is the same as getpixelposition when units are pixels per Luna's comment. Note that Position is larger than OuterPosition for all properties except the height …

Best Answer

The larger one probably includes the operating system borders of the figure, while the smaller one does not include the border. That's my guess.
Related Question