Set the rotation of the text. Parameters ---------- s : float or {'vertical', 'horizontal'} The rotation angle in degrees in mathematically positive direction (counterclockwise). 'horizontal' equals 0, 'vertical' equals 90.
(self, s)
| 1387 | self.stale = True |
| 1388 | |
| 1389 | def set_rotation(self, s): |
| 1390 | """ |
| 1391 | Set the rotation of the text. |
| 1392 | |
| 1393 | Parameters |
| 1394 | ---------- |
| 1395 | s : float or {'vertical', 'horizontal'} |
| 1396 | The rotation angle in degrees in mathematically positive direction |
| 1397 | (counterclockwise). 'horizontal' equals 0, 'vertical' equals 90. |
| 1398 | """ |
| 1399 | if isinstance(s, Real): |
| 1400 | self._rotation = float(s) % 360 |
| 1401 | elif cbook._str_equal(s, 'horizontal') or s is None: |
| 1402 | self._rotation = 0. |
| 1403 | elif cbook._str_equal(s, 'vertical'): |
| 1404 | self._rotation = 90. |
| 1405 | else: |
| 1406 | raise ValueError("rotation must be 'vertical', 'horizontal' or " |
| 1407 | f"a number, not {s}") |
| 1408 | self.stale = True |
| 1409 | |
| 1410 | def set_transform_rotates_text(self, t): |
| 1411 | """ |
no outgoing calls