MATLAB: Hello, could anyone help me? I have problem to synchronize zoom in a GUI:

axesguiImage Processing Toolboxlinkaxeszoom

How to do this with different axes in a GUI, not with subplot.
figure
ax1 = subplot(2,1,1);
RGB = imread('peppers.png');
I = rgb2gray(RGB);
imshow(I);
ax2 = subplot(2,1,2);
RGB = imread('peppers.png');
imshow(RGB);
linkaxes([ax1,ax2],'xy')

Best Answer

subplot replies axes objects. Therefore the code is exactly the same with axes:
RGB = imread('peppers.png');
figure
ax1 = axes('Position', [0.1, 0.1, 0.3, 0.8]);
imshow(rgb2gray(RGB));
ax2 = axes('Position', [0.6, 0.1, 0.3, 0.8]);
imshow(RGB);
linkaxes([ax1,ax2],'xy')
Related Question