I can use the tricks above to get the axis to not rescale/change size when a rectangle is added. But what if I want to display a different picture with a different size on the axis? How do I get matlab to change the axis size in this case and then go back to not changing it when I put new rectangles on it?
I've tried various combinations of axis auto; and axis manual; but they don't seem to work. The problem is that it doesn't rescale the axis depending on the new image size. Instead, it just continues the new image off of the page (GUI window).