"Matt J" wrote in message <firstname.lastname@example.org>... > 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 one-time "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.