Rotate[g,θ]
represents 2D graphics primitives or any other objects g rotated counterclockwise by θ radians about the center of their bounding box.
Rotate[g,θ,{x,y}]
rotates about the point {x,y}.
Rotate[g,{u,v}]
rotates around the origin, transforming the 2D or 3D vector u to v.
Rotate[g,θ,w]
rotates 3D graphics primitives by θ radians around the 3D vector w anchored at the origin.
Rotate[g,θ,w,p]
rotates around the 3D vector w anchored at p.
Rotate[g,θ,{u,v}]
rotates by angle θ in the plane spanned by 3D vectors u and v.
Rotate
Rotate[g,θ]
represents 2D graphics primitives or any other objects g rotated counterclockwise by θ radians about the center of their bounding box.
Rotate[g,θ,{x,y}]
rotates about the point {x,y}.
Rotate[g,{u,v}]
rotates around the origin, transforming the 2D or 3D vector u to v.
Rotate[g,θ,w]
rotates 3D graphics primitives by θ radians around the 3D vector w anchored at the origin.
Rotate[g,θ,w,p]
rotates around the 3D vector w anchored at p.
Rotate[g,θ,{u,v}]
rotates by angle θ in the plane spanned by 3D vectors u and v.
Details and Options
- θ Degree or θ° specifies an angle in degrees.
- If Rotate appears outside a graphic, the object g in Rotate[g,θ] etc. can be any expression.
- You can specify special points such as {Left,Bottom} within the bounding box for g.
- The x position can be specified as Left, Center, or Right; the y position as Bottom, Center, or Top.
- If Rotate appears within a graphic, the coordinates {x,y} are taken to be in the coordinate system of the graphic.
- If Rotate appears outside a graphic, the coordinates {x,y} are taken to run from
to
across the bounding box of the object being rotated. - Rotate[g,θ] is equivalent to Rotate[g,θ,{Center,Center}].
- For objects specified with scaled coordinates Scaled[{x,y}], Rotate effectively applies its transformation to the corresponding ordinary coordinates.
- If Rotate appears inside a graphic, Normal[expr] if possible replaces all Rotate[gi,…] constructs by versions of the gi in which the coordinates have explicitly been transformed.
Examples
open all close allBasic Examples (3)
Scope (8)
Transformation applied to a 2D shape:
gr = {Rectangle[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0}]}, {Green, Point[{1, 1}]}};Graphics[{{Opacity[.35], Blue, gr}, Rotate[{Opacity[.85], Red, gr}, Pi / 6]}]Transformation applied to a 3D shape:
gr = {Cuboid[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0, 0}]}, {Green, Point[{1, 1, 1}]}};Graphics3D[{{Opacity[.35], Blue, gr}, Rotate[{Opacity[.85], Red, gr}, Pi / 6, {0, 0, 1}, {.5, .5, .5}]}, Boxed -> False]Rotation around the vector
anchored at the point
:
Graphics3D[Rotate[Cuboid[], Pi, {0, 0, 1}, {1, 1, 1}], Axes -> True, PlotRange -> {{0, 2}, {0, 2}, {0, 2}}]Rotation mapping vector
to vector
:
Graphics3D[Rotate[Cuboid[], {{1, 1, 1}, {0, 0, 1}}]]Rotation in the plane spanned by vectors
and
:
Graphics3D[Rotate[Cylinder[], Pi / 2, {{1, 1, 0}, {0, 0, 1}}]]Graphics[Rotate[Style[Text["Mathematica"], 24], -Pi / 4]]Rotate objects with scaled coordinates:
Graphics[Rotate[Circle[Scaled[{1, 0}]], Pi, {0, 0}], Axes -> True]Keep the lower-right corner of the rectangle fixed:
Graphics[{Circle[], Rotate[Rectangle[], Pi / 4, {Right, Bottom}]}, Axes -> True]Applications (2)
Grid[{
{Rotate["Primary", 90°, {1, 1}], "Red"}, {, "Blue"}, {, "Yellow"},
{Rotate["Secondary", 90°, {1, 1}], "Purple"}, {, "Green"}, {, "Orange"}
}, Frame -> All, Alignment -> Left]Rotate[Grid[Table[Rotate[{i, j}, 45°], {i, 0, 2}, {j, 0, 2}], Frame -> All], -45°]Properties & Relations (1)
When possible, Normal will transform the coordinates explicitly:
Normal@Rotate[Cylinder[], Pi / 4, {1, 0, 0}]Possible Issues (4)
By default, Rotate uses the center of the bounding box as the center of rotation:
Graphics[{Opacity[0.5], Rotate[Rectangle[], Pi / 3]}, Axes -> True]Explicitly specify a center of rotation:
Graphics[{Opacity[0.5], Rotate[Rectangle[], Pi / 3, {0, 0}]}, Axes -> True]Transforming an object may move it out of view:
Graphics[Rotate[Circle[], Pi / 2, Right], Axes -> True]Adjust the PlotRange to display the transformed object:
Graphics[Rotate[Circle[], Pi / 2, Right], Axes -> True, PlotRange -> 2]The center of the baseline of rotated text aligns with the baseline of the surrounding text:
Row[{"abc", Rotate["ghi", 90°], "xyz"}, " "]For a different alignment, specify an explicit center of rotation:
Row[{"abc", Rotate["ghi", 90°, {Left, Baseline}], "xyz"}, " "]Since text bounding boxes are always rectilinear, successive rotations can introduce extra space:
NestList[Style[Rotate[#, 30 Degree], Background -> RGBColor[1, 0, 0, 0.2]]&, "R", 8]Related Guides
Related Workflows
- Rotate, Pan and Zoom 3D Graphics
Text
Wolfram Research (2007), Rotate, Wolfram Language function, https://reference.wolfram.com/language/ref/Rotate.html (updated 2008).
CMS
Wolfram Language. 2007. "Rotate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Rotate.html.
APA
Wolfram Language. (2007). Rotate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Rotate.html
BibTeX
@misc{reference.wolfram_2026_rotate, author="Wolfram Research", title="{Rotate}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Rotate.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_rotate, organization={Wolfram Research}, title={Rotate}, year={2008}, url={https://reference.wolfram.com/language/ref/Rotate.html}, note=[Accessed: 15-June-2026]}