rotate
Rotate graphics objects about an axis.
📝Syntax
rotate(h, direction, alpha)
rotate(h, direction, alpha, origin)
📥Input Arguments
Parameter Description
h a graphics object or an array of objects with XData/YData(/ZData).
direction the rotation axis: a three-element vector [x y z], or a two-element [azimuth elevation] in degrees.
alpha the rotation angle in degrees.
origin the center of rotation (default: the center of the axes plot box).
📄Description

rotate rotates the graphics objects h by alpha degrees about the axis given by direction, passing through origin. The object data is transformed in place.

💡Examples
f = figure();
s = surf(peaks(20));
rotate(s, [0 0 1], 45);
🔗See Also
gca
🕔Version History
Version Description
2.0.0 Initial version.
Edit this page on GitHub