MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_rotation

Method get_rotation

lib/matplotlib/text.py:339–345  ·  view source on GitHub ↗

Return the text angle in degrees in the range [0, 360).

(self)

Source from the content-addressed store, hash-verified

337 return (np.abs(size_accum - std_x)).argmin()
338
339 def get_rotation(self):
340 """Return the text angle in degrees in the range [0, 360)."""
341 if self.get_transform_rotates_text():
342 return self.get_transform().transform_angles(
343 [self._rotation], [self.get_unitless_position()]).item(0) % 360
344 else:
345 return self._rotation
346
347 def get_transform_rotates_text(self):
348 """

Callers 15

_get_layoutMethod · 0.95
_get_wrap_line_widthMethod · 0.95
drawMethod · 0.95
drawMethod · 0.45
get_window_extentMethod · 0.45
create_collectionMethod · 0.45
test_pie_textpropsFunction · 0.45
test_get_rotation_stringFunction · 0.45
test_get_rotation_floatFunction · 0.45
test_get_rotation_intFunction · 0.45

Calls 4

get_unitless_positionMethod · 0.95
transform_anglesMethod · 0.80
get_transformMethod · 0.45

Tested by 10

test_pie_textpropsFunction · 0.36
test_get_rotation_stringFunction · 0.36
test_get_rotation_floatFunction · 0.36
test_get_rotation_intFunction · 0.36
test_get_rotation_noneFunction · 0.36
test_get_rotation_mod360Function · 0.36
test_autofmt_xdateFunction · 0.36