|
1 | 1 | """ |
2 | | -=========================== |
3 | | -Text rotation demonstration |
4 | | -=========================== |
5 | | -
|
6 | | -The way matplotlib does text layout is counter-intuitive to some, so |
7 | | -this example is designed to make it a little clearer. The text is |
8 | | -aligned by it's bounding box (the rectangular box that surrounds the |
9 | | -ink rectangle). The order of operations is rotation then |
10 | | -alignment, rather than alignment then rotation. Basically, the text |
11 | | -is centered at your x,y location, rotated around this point, and then |
12 | | -aligned according to the bounding box of the rotated text. |
| 2 | +=================================== |
| 3 | +Default text rotation demonstration |
| 4 | +=================================== |
| 5 | +
|
| 6 | +The way Matplotlib does text layout by default is counter-intuitive to some, so |
| 7 | +this example is designed to make it a little clearer. |
| 8 | +
|
| 9 | +The text is aligned by its bounding box (the rectangular box that surrounds the |
| 10 | +ink rectangle). The order of operations is rotation then alignment. |
| 11 | +Basically, the text is centered at your x,y location, rotated around this |
| 12 | +point, and then aligned according to the bounding box of the rotated text. |
13 | 13 |
|
14 | 14 | So if you specify left, bottom alignment, the bottom left of the |
15 | 15 | bounding box of the rotated text will be at the x,y coordinate of the |
|
0 commit comments