フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

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

1 回表示 (過去 30 日間)
André
André 2018 年 10 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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);

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by