This function does a great job. However, when the colorbar is present in the figure, the function returns the plotted axis region as if a colorbar doesn't exist. I was graphing a pcolor plot with the colorbar on when I discovered this.
Carlos, getInUnits.m is available in the File Exchange: (http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8898&objectType=file). Sorry for the confusion; I will update the documentation on this page to clarify this.
13 Feb 2006
Kelly, getInUnits does not exist, as far as I can tall, as a MATLAB function.
14 Feb 2006
Clarified use of another File Exchange function (getInUnits.m).
26 May 2010
Small rewrite to remove dependency on external functions
19 Oct 2011
Now defaults to current axis if no input provided. Also updated example image to a simpler one.