|
34 | 34 | picker [None|float|bool|callable] |
35 | 35 | position (x, y) |
36 | 36 | rotation [ angle in degrees | ``'vertical'`` | ``'horizontal'`` ] |
37 | | -size or fontsize [ size in points | relative size, e.g., ``'smaller'``, ``'x-large'`` ] |
| 37 | + size or fontsize [ size in points | relative size, e.g., ``'small'``, ``'x-large'`` ] |
38 | 38 | style or fontstyle [ ``'normal'`` | ``'italic'`` | ``'oblique'`` ] |
39 | 39 | text string or anything printable with '%s' conversion |
40 | 40 | transform `~matplotlib.transforms.Transform` subclass |
|
48 | 48 | ========================== ====================================================================================================================== |
49 | 49 |
|
50 | 50 |
|
| 51 | +Text alignment |
| 52 | +============== |
| 53 | +
|
51 | 54 | You can lay out text with the alignment arguments |
52 | 55 | ``horizontalalignment``, ``verticalalignment``, and |
53 | 56 | ``multialignment``. ``horizontalalignment`` controls whether the x |
|
69 | 72 | import matplotlib.patches as patches |
70 | 73 |
|
71 | 74 | # build a rectangle in axes coords |
72 | | -left, width = .25, .5 |
73 | | -bottom, height = .25, .5 |
| 75 | +left, width = 0.25, 0.5 |
| 76 | +bottom, height = 0.25, 0.5 |
74 | 77 | right = left + width |
75 | 78 | top = bottom + height |
76 | 79 |
|
|
144 | 147 | plt.show() |
145 | 148 |
|
146 | 149 | # %% |
| 150 | +# Relative font sizes |
| 151 | +# =================== |
| 152 | +# |
| 153 | +# Font sizes can be specified in points, or as a string that indicates the size |
| 154 | +# relative to the default font size. The following are valid values for relative font sizes: |
| 155 | +# |
| 156 | +# ==================== ================================ |
| 157 | +# Relative font size Scaling of default font size |
| 158 | +# ==================== ================================ |
| 159 | +# xx-small 0.579 |
| 160 | +# x-small 0.694 |
| 161 | +# small 0.833 |
| 162 | +# medium 1.000 |
| 163 | +# large 1.200 |
| 164 | +# x-large 1.440 |
| 165 | +# xx-large 1.728 |
| 166 | +# ==================== ================================ |
| 167 | +# |
| 168 | +# |
147 | 169 | # ============== |
148 | 170 | # Default Font |
149 | 171 | # ============== |
|
0 commit comments