Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Rotate a 2d plot

I have a 2d plot with multiple arrows, lines etc. and I would like to rotate the entire thing. Here's a simple example without rotation. The real example has more objects on it so I'd rather rotate the entire plot than each individual object.

O = vector((0, 0))
Tp = vector((1, 0))
Np = vector((0, 1))

p = plot([])

p += arrow2d(O, Tp, color="blue")
p += arrow2d(O, Np, color="blue")

p.show(axes=False, aspect_ratio=1)

How can I go about rotating the entire plot by a fixed angle? I have only been able to find information about rotations for 3d plots.