Info

This question is closed. Reopen it to edit or answer.

Zoom reset of 2 linked axes is not equal and behaves strangely after applying rotate3d

1 view (last 30 days)
Hello
I need to create 2 3D plots in the same figure, and sync their view and axes limits. If I rotate3D the second axes, obviously the first axes will also rotate the same way. Now I would like to restore the original view.
The problem is the following:
  • If I double click the second axes to restore the original view, everything works fine.
  • If I double click the first axes instead, it now assumes the original view is the rotated view, and not the original one.
So the axes are linked, but their original views are different. Why does it happen? And how can I work around this? I want both of them the have the true original view.
Best regards, André
a = figure
b = axes(a, 'units', 'normalized', 'position', [0,0,0.45,1])
c = axes(a, 'units', 'normalized', 'position', [0.5,0,0.45,1])
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surf(b, X,Y,Z)
surf(c, X,Y,Z)
hlink3D = linkprop([b,c],{'View', 'XLim', 'YLim', 'CLim'});
setappdata(a, 'hlink3D', hlink3D);

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!