How do I link/lock multiple axis so that they all rotate simultaneously?

조회 수: 58 (최근 30일)
I have two sets of axis in one figure and I want to use my mouse to 3D-rotate the plots. The Axis are aligned using linkaxes() and ax1.Position = ax2.Position
The problem is, that only one plot is rotating at a time.
I used two axis, because I want a different colormap on each one.
Thanks for any suggestions! -Fabian

채택된 답변

Jan
Jan 2018년 8월 6일
The 'Position' property is the location relative to the figure. But you want to control the 'CameraPosition', 'CameraTarget', 'CameraUpVector' and 'CameraViewAngle'. Use linkaxes to link them.
  댓글 수: 3
Fabian Gock
Fabian Gock 2018년 8월 6일
편집: Adam Danz 2022년 3월 9일
I solved it with
linkprop([ax2 ax1], {'View', 'XLim', 'YLim', 'ZLim'})
Thanks :)
M Carpenter
M Carpenter 2019년 5월 20일
This was very helpful, thank you Fabian and Jan!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by