http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098
MATLAB Central Newsreader  Copying zoom parameters across different figures
Feed for thread: Copying zoom parameters across different figures
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Fri, 05 Feb 2010 16:58:02 +0000
Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#714371
Matt J
I have two image figures.<br>
<br>
figure(1); imagesc(...)<br>
figure(2); imagesc(...)<br>
<br>
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?

Fri, 05 Feb 2010 17:46:02 +0000
Re: Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#714388
Bruno Luong
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hkhimq$550$1@fred.mathworks.com>...<br>
> I have two image figures.<br>
> <br>
> figure(1); imagesc(...)<br>
> figure(2); imagesc(...)<br>
> <br>
> 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?<br>
<br>
Use LINKAXES<br>
<br>
Bruno

Fri, 05 Feb 2010 18:30:22 +0000
Re: Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#714411
Matt J
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hkhlgq$g7$1@fred.mathworks.com>...<br>
<br>
> Use LINKAXES<br>
===============<br>
<br>
Thanks. That actually put me on the trail of linkprops, which is even better for what I need.

Fri, 05 Feb 2010 21:39:20 +0000
Re: Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#714476
Matt J
A followup question. I would like to synchronize all figure properties, including, for example, the data tip. I.e., if I turn the data tip on in one figure, I'd like it to be turned on in the other automatically. I tried using linkprop(), but it doesn't seem to accept the WindowButton* properties as linkable. Is there a way to do this?

Thu, 15 Nov 2012 19:54:21 +0000
Re: Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#891780
C Vasco
"Matt J" wrote in message <hkhimq$550$1@fred.mathworks.com>...<br>
> I have two image figures.<br>
> <br>
> figure(1); imagesc(...)<br>
> figure(2); imagesc(...)<br>
> <br>
> 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?<br>
<br>
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.<br>
<br>
First, have the figure with desired zoom parameters selected or in focus.<br>
Then, use<br>
>> myaxes = axis<br>
to get the current axis scaling and appearance.<br>
<br>
Finally, select the target axis that will be updated and use<br>
>> axis(gca, myaxes)<br>
to apply the saved axis limits.<br>
<br>
 C

Tue, 20 Nov 2012 19:16:08 +0000
Re: Copying zoom parameters across different figures
http://www.mathworks.com/matlabcentral/newsreader/view_thread/272098#892077
Matt J
"C Vasco" wrote in message <k83h9c$o63$1@newscl01ah.mathworks.com>...<br>
><br>
> First, have the figure with desired zoom parameters selected or in focus.<br>
> Then, use<br>
> >> myaxes = axis<br>
> to get the current axis scaling and appearance.<br>
> <br>
> Finally, select the target axis that will be updated and use<br>
> >> axis(gca, myaxes)<br>
> to apply the saved axis limits.<br>
===============<br>
<br>
Good!