|
28 | 28 | # .. figure:: ../../gallery/pyplots/images/sphx_glr_annotation_basic_001.png
|
29 | 29 | # :target: ../../gallery/pyplots/annotation_basic.html
|
30 | 30 | # :align: center
|
31 |
| -# :scale: 50 |
32 | 31 | #
|
33 | 32 | # In this example, both the *xy* (arrow tip) and *xytext* locations
|
34 | 33 | # (text location) are in data coordinates. There are a variety of other
|
|
90 | 89 | # .. figure:: ../../gallery/pyplots/images/sphx_glr_annotation_polar_001.png
|
91 | 90 | # :target: ../../gallery/pyplots/annotation_polar.html
|
92 | 91 | # :align: center
|
93 |
| -# :scale: 50 |
94 | 92 | #
|
95 | 93 | # For more on all the wild and wonderful things you can do with
|
96 | 94 | # annotations, including fancy arrows, see :ref:`plotting-guide-annotation`
|
|
114 | 112 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_text_arrow_001.png
|
115 | 113 | # :target: ../../gallery/userdemo/annotate_text_arrow.html
|
116 | 114 | # :align: center
|
117 |
| -# :scale: 50 |
118 | 115 | #
|
119 | 116 | # `~.Axes.text` takes a *bbox* keyword argument, which draws a box around the
|
120 | 117 | # text::
|
|
153 | 150 | # .. figure:: ../../gallery/shapes_and_collections/images/sphx_glr_fancybox_demo_001.png
|
154 | 151 | # :target: ../../gallery/shapes_and_collections/fancybox_demo.html
|
155 | 152 | # :align: center
|
156 |
| -# :scale: 50 |
157 | 153 | #
|
158 | 154 | # Note that the attribute arguments can be specified within the style
|
159 | 155 | # name with separating comma (this form can be used as "boxstyle" value
|
|
191 | 187 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple01_001.png
|
192 | 188 | # :target: ../../gallery/userdemo/annotate_simple01.html
|
193 | 189 | # :align: center
|
194 |
| -# :scale: 50 |
195 | 190 | #
|
196 | 191 | # The arrow is drawn as follows:
|
197 | 192 | #
|
|
206 | 201 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_explain_001.png
|
207 | 202 | # :target: ../../gallery/userdemo/annotate_explain.html
|
208 | 203 | # :align: center
|
209 |
| -# :scale: 50 |
210 | 204 | #
|
211 | 205 | # The creation of the connecting path between two points is controlled by
|
212 | 206 | # ``connectionstyle`` key and the following styles are available.
|
|
233 | 227 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_connectionstyle_demo_001.png
|
234 | 228 | # :target: ../../gallery/userdemo/connectionstyle_demo.html
|
235 | 229 | # :align: center
|
236 |
| -# :scale: 50 |
237 | 230 | #
|
238 | 231 | # The connecting path (after clipping and shrinking) is then mutated to
|
239 | 232 | # an arrow patch, according to the given ``arrowstyle``.
|
|
258 | 251 | # .. figure:: ../../gallery/text_labels_and_annotations/images/sphx_glr_fancyarrow_demo_001.png
|
259 | 252 | # :target: ../../gallery/text_labels_and_annotations/fancyarrow_demo.html
|
260 | 253 | # :align: center
|
261 |
| -# :scale: 50 |
262 | 254 | #
|
263 | 255 | # Some arrowstyles only work with connection styles that generate a
|
264 | 256 | # quadratic-spline segment. They are ``fancy``, ``simple``, and ``wedge``.
|
|
271 | 263 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple02_001.png
|
272 | 264 | # :target: ../../gallery/userdemo/annotate_simple02.html
|
273 | 265 | # :align: center
|
274 |
| -# :scale: 50 |
275 | 266 | #
|
276 | 267 | # As with `~.Axes.text`, a box around the text can be drawn using the *bbox*
|
277 | 268 | # argument.
|
278 | 269 | #
|
279 | 270 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple03_001.png
|
280 | 271 | # :target: ../../gallery/userdemo/annotate_simple03.html
|
281 | 272 | # :align: center
|
282 |
| -# :scale: 50 |
283 | 273 | #
|
284 | 274 | # By default, the starting point is set to the center of the text
|
285 | 275 | # extent. This can be adjusted with ``relpos`` key value. The values
|
|
289 | 279 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple04_001.png
|
290 | 280 | # :target: ../../gallery/userdemo/annotate_simple04.html
|
291 | 281 | # :align: center
|
292 |
| -# :scale: 50 |
293 | 282 | #
|
294 | 283 | # Placing Artist at the anchored location of the Axes
|
295 | 284 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
366 | 355 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_anchored_box04_001.png
|
367 | 356 | # :target: ../../gallery/userdemo/anchored_box04.html
|
368 | 357 | # :align: center
|
369 |
| -# :scale: 50 |
370 | 358 | #
|
371 | 359 | # Note that unlike the legend, the ``bbox_transform`` is set
|
372 | 360 | # to IdentityTransform by default.
|
|
409 | 397 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple_coord01_001.png
|
410 | 398 | # :target: ../../gallery/userdemo/annotate_simple_coord01.html
|
411 | 399 | # :align: center
|
412 |
| -# :scale: 50 |
413 | 400 | #
|
414 | 401 | # Note that you must ensure that the extent of the coordinate artist (*an1* in
|
415 | 402 | # above example) is determined before *an2* gets drawn. Usually, this means
|
|
439 | 426 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple_coord02_001.png
|
440 | 427 | # :target: ../../gallery/userdemo/annotate_simple_coord02.html
|
441 | 428 | # :align: center
|
442 |
| -# :scale: 50 |
443 | 429 | #
|
444 | 430 | # 5. Sometimes, you want your annotation with some "offset points", not from the
|
445 | 431 | # annotated point but from some other point. `.text.OffsetFrom` is a helper
|
|
448 | 434 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_annotate_simple_coord03_001.png
|
449 | 435 | # :target: ../../gallery/userdemo/annotate_simple_coord03.html
|
450 | 436 | # :align: center
|
451 |
| -# :scale: 50 |
452 | 437 | #
|
453 | 438 | # You may take a look at this example
|
454 | 439 | # :doc:`/gallery/text_labels_and_annotations/annotation_demo`.
|
|
472 | 457 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_connect_simple01_001.png
|
473 | 458 | # :target: ../../gallery/userdemo/connect_simple01.html
|
474 | 459 | # :align: center
|
475 |
| -# :scale: 50 |
476 | 460 | #
|
477 | 461 | # Here, we added the ConnectionPatch to the *figure* (with `~.Figure.add_artist`)
|
478 | 462 | # rather than to either axes: this ensures that it is drawn on top of both axes,
|
|
492 | 476 | # .. figure:: ../../gallery/subplots_axes_and_figures/images/sphx_glr_axes_zoom_effect_001.png
|
493 | 477 | # :target: ../../gallery/subplots_axes_and_figures/axes_zoom_effect.html
|
494 | 478 | # :align: center
|
495 |
| -# :scale: 50 |
496 | 479 | #
|
497 | 480 | # Define Custom BoxStyle
|
498 | 481 | # ~~~~~~~~~~~~~~~~~~~~~~
|
|
518 | 501 | # .. figure:: ../../gallery/userdemo/images/sphx_glr_custom_boxstyle01_001.png
|
519 | 502 | # :target: ../../gallery/userdemo/custom_boxstyle01.html
|
520 | 503 | # :align: center
|
521 |
| -# :scale: 50 |
522 | 504 | #
|
523 | 505 | # Similarly, you can define a custom ConnectionStyle and a custom ArrowStyle.
|
524 | 506 | # See the source code of ``lib/matplotlib/patches.py`` and check
|
|
0 commit comments