|
113 | 113 | import matplotlib.patches as mpatches
|
114 | 114 |
|
115 | 115 | fig, ax = plt.subplots(figsize=(3, 3))
|
116 |
| -arr = mpatches.FancyArrowPatch((1.25, 1.25), (1.75, 1.75), |
| 116 | +arr = mpatches.FancyArrowPatch((1.25, 1.5), (1.75, 1.5), |
117 | 117 | arrowstyle='->,head_width=.15', mutation_scale=20)
|
118 | 118 | ax.add_patch(arr)
|
119 |
| -ax.annotate("label", (.5, .5), xycoords=arr, ha='center', va='center') |
| 119 | +ax.annotate("label", (.5, .5), xycoords=arr, ha='center', va='bottom') |
120 | 120 | ax.set(xlim=(1, 2), ylim=(1, 2))
|
121 | 121 |
|
122 | 122 | # %%
|
123 | 123 | # Here the annotation is placed at position (.5,.5) relative to the arrow's
|
124 |
| -# lower left corner and is vertically and horizontally centered at that |
125 |
| -# position. For an example of chaining annotation Artists, see the |
| 124 | +# lower left corner and is vertically and horizontally at that position. |
| 125 | +# Vertically, the bottom aligns to that reference point so that the label |
| 126 | +# is above the line. For an example of chaining annotation Artists, see the |
126 | 127 | # :ref:`Artist section <artist_annotation_coord>` of
|
127 | 128 | # :ref:`annotating_coordinate_systems`.
|
128 | 129 | #
|
|
0 commit comments