Synchronise different viewing angles onto same scatter plot
7 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to have a figure with two subplots (or preferably even two separate figures), showing the same 3d point cloud, but from different viewing angles. I would like to see the same point cloud from two different angles to get a better feeling for the points' locations in the 3d space, and I must be able to rotate the plots in sync. I managed to have 2 plots synchronised using linkprop, but I can't change the angle of one of the plots once they're synced.
Thanks for any help!
2 件のコメント
Walter Roberson
2016 年 9 月 2 日
The rotate tool changes view() which in turn changes the axes CameraPosition and CameraViewAngle . Considering that you want different viewing angles, exactly what is it that you want to be synchronized between the two? CameraPosition, CameraViewAngle, CameraTarget, CameraUpVector ?
In terms of view, if the first plot is
view(a,b)
then what should be the view() for the second plot?
採用された回答
Walter Roberson
2016 年 9 月 5 日
You will need to use addlistener for changes to the CameraPosition and CameraViewAngle properties . In the listener, you can call view() on the first axis to find the values that you would then add 20 to and call view() for the second axes.
linkprop and linkaxes are only for synchronizing exact values, and do not provide for computing one property based upon the other.
5 件のコメント
Walter Roberson
2016 年 9 月 5 日
Okay, it appears that you can addlistener on 'View', at least in R2016a.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Graphics Object Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!