Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Copying zoom parameters across different figures
Posted:
Nov 15, 2012 2:54 PM


"Matt J" wrote in message <hkhimq$550$1@fred.mathworks.com>... > I have two image figures. > > figure(1); imagesc(...) > figure(2); imagesc(...) > > I use the zoom tool to magnify a portion of one of figure(1). I would then like to apply the same zoom parameters to figure(2). Is there an easy way to programmatically extract the zoom parameters of one and copy them to the second?
It has been a while since this was posted, but I found a solution that will work for a onetime "copy" of zoom parameters from one figure to another.
First, have the figure with desired zoom parameters selected or in focus. Then, use >> myaxes = axis to get the current axis scaling and appearance.
Finally, select the target axis that will be updated and use >> axis(gca, myaxes) to apply the saved axis limits.
 C



