InvalidRotationError(rotation)
Source¶
Bases: NumdaplotError
Raised when the x_tick_rotation or the y_tick_rotation of a PlotStyle is outside -90 to 90 degrees.
Beyond these angles, the labels would be written upside down.
Added in version 0.1.0
Parameters:
-
rotation(float)The rotation given.
Attributes:
-
rotationThe rotation given.
Examples:
import numdaplot as ndp
try:
ndp.PlotStyle(x_tick_rotation=120)
except ndp.InvalidRotationError as error:
print(error)
# Expected a rotation from -90 to 90 degrees, got 120.