Hey every one,
Using the above solution, rotations can be synced. But when I try to zoom in on one of the subplots, the other subplot doesn't stay on the same position in the figure, it moves around. The same also happpens, when I try to pan one subplot. And when zooming in, the other subplot doesn't sync it's axes limits.
For 2D subplots, linkaxes seems to do the job. So what is the solution for the 3D case?
Below is a example code to illustrate the problem
ax1 = subplot(1, 2, 1);
[x,y,z] = peaks;
surf(x,y,z);
ax2 = subplot(1, 2, 2);
[x,y,z] = peaks(10);
surf(x,y,z);
Link = linkprop([ax1, ax2],{'CameraUpVector', 'CameraPosition', 'CameraTarget'});
setappdata(gcf, 'StoreTheLink', Link);
Any help will be appreciated.
3 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_474598
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_474598
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_474916
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_474916
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_475038
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/351573-how-to-link-2-3d-subplots-to-sync-zoom-and-pan#comment_475038
Sign in to comment.