File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -309,16 +309,22 @@ def rotation(self) -> float:
309309 Positive angles rotates the view in the counter clockwise
310310 order (or towards the east).
311311
312+ It can be set with either a float number in degrees
313+ or an astropy.coordinates.Angle object.
314+
312315 Returns
313316 -------
314- float
315- The center rotation of the widget in degrees.
316- The default rotation is 0 degrees.
317+ astropy.coordinates.Angle
318+ An astropy.coordinates.Angle object representing the center
319+ rotation of the widget in degrees. The default rotation is
320+ 0 degrees.
317321 """
318- return self ._rotation
322+ return Angle ( self ._rotation , unit = "deg" )
319323
320324 @rotation .setter
321- def rotation (self , rotation : float ) -> None :
325+ def rotation (self , rotation : Union [float , Angle ]) -> None :
326+ if isinstance (rotation , Angle ):
327+ rotation = rotation .deg
322328 if np .isclose (self ._rotation , rotation ):
323329 return
324330 self ._wcs = {}
You can’t perform that action at this time.
0 commit comments