Select axes for zoom in/out
古いコメントを表示
I've got a figure with several axes. These axes are parented with a plot of several variables. Also, I've created a popup menu to select which of these axes I want to use. Until here all is OK.
However, when I select the axes and I push the zoom in button, The figure always takes the same axes.
採用された回答
その他の回答 (1 件)
Brett Shoelson
2011 年 2 月 10 日
img = imread('cameraman.tif');
f = figure;
ax(1) = subplot(1,2,1);
imshow(img)
ax(2) = subplot(1,2,2);
imshow(im2bw(img,graythresh(img)));
axes(ax(1));
% OR PREFERABLY:
set(f,'currentAxes',ax(1))
%Then:
set(zoom(1.5))% will affect the first axes.
Also: Note that you can programmatically modify the x- y- limits of each axes. For instance:
set(ax(1),'xlim',[1 100],'ylim',[200 300])
Cheers, Brett
カテゴリ
ヘルプ センター および File Exchange で Data Exploration についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!