I hope someone can assist me as I am pretty new to Mathematica and understanding the language is a bit of a hurdle.

I am trying to rotate a plot of interlaced circles by some angle without rotating the axis and this is the method that somewhat worked the best.

Show[
Normal[someplot] /. prim : _Line | _Point | _Polygon :>
GeometricTransformation[prim, RotationTransform[Pi/20]], PlotRange -> All, AspectRatio -> Automatic
]


How to rotate the curve but not the axes?

I would please like to know what the code below is doing. Particularly the "/. prim : _Line | _Point | _Polygon :>" part.

Thank you dearly.

Normal[p] is needed to replace GraphicsComplex by a full form with all coodinates.

prim : _Line | _Point | _Polygon is a pattern that matches a line, point or polygon.

:> GeometricTransform[prim,..] replaces the matched line, point or polygon by a rotated version of it.

Here is a small example:

p= Graphics[{Line[{{0, 0}, {1, 1}}], Point[{1, 0.5}]}, Axes -> True] p /. prim : _Line | _Point | _Polygon :>
GeometricTransformation[prim, RotationTransform[Pi/2]] • Thank you very much. This was of much help! Nov 21, 2021 at 19:52