MATLAB: How to link/lock multiple axis so that they all rotate simultaneously

3d plotsaxesaxisMATLABplotrotate

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

Best Answer

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.