lstein.utils.correct_labelrotation

lstein.utils.correct_labelrotation(theta: float) float[source]

corrects label-rotation to always be readable

  • function to make labels always face the right way up

  • rotates any text that is upside down by 180 degrees
    • upside down meaning it has a rotation in the interval $(90,270)$

Parameters
  • theta
    • float

    • rotation angle in degrees

Raises

Returns
  • theta
    • float

    • theta after correcting upside down angles

Dependencies
  • numpy

  • typing