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

39 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Jan
Jan am 6 Aug. 2018
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 Kommentare
Fabian Gock
Fabian Gock am 6 Aug. 2018
Bearbeitet: Adam Danz am 9 Mär. 2022
I solved it with
linkprop([ax2 ax1], {'View', 'XLim', 'YLim', 'ZLim'})
Thanks :)
M Carpenter
M Carpenter am 20 Mai 2019
This was very helpful, thank you Fabian and Jan!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Geographic Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by