rotate(h, direction, alpha)
rotate(h, direction, alpha, origin)
| 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). |
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.
f = figure();
s = surf(peaks(20));
rotate(s, [0 0 1], 45);
| Version | Description |
|---|---|
| 2.0.0 | Initial version. |