|
10 | 10 | .. _annotations-tutorial:
|
11 | 11 |
|
12 | 12 | Basic annotation
|
13 |
| -================ |
| 13 | +---------------- |
14 | 14 |
|
15 | 15 | The uses of the basic :func:`~matplotlib.pyplot.text` will place text
|
16 | 16 | at an arbitrary position on the Axes. A common use case of text is to
|
|
103 | 103 |
|
104 | 104 | .. _plotting-guide-annotation:
|
105 | 105 |
|
106 |
| -Advanced Annotation |
107 |
| -=================== |
108 |
| -
|
| 106 | +Advanced Annotations |
| 107 | +-------------------- |
109 | 108 |
|
110 | 109 | Annotating with Text with Box
|
111 |
| ------------------------------ |
| 110 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
112 | 111 |
|
113 | 112 | Let's start with a simple example.
|
114 | 113 |
|
|
173 | 172 | bb.set_boxstyle("rarrow,pad=0.6")
|
174 | 173 |
|
175 | 174 |
|
176 |
| -
|
177 |
| -
|
178 | 175 | Annotating with Arrow
|
179 |
| ---------------------- |
| 176 | +~~~~~~~~~~~~~~~~~~~~~ |
180 | 177 |
|
181 | 178 | The :func:`~matplotlib.pyplot.annotate` function in the pyplot module
|
182 | 179 | (or annotate method of the Axes class) is used to draw an arrow
|
|
330 | 327 |
|
331 | 328 |
|
332 | 329 | Placing Artist at the anchored location of the Axes
|
333 |
| ---------------------------------------------------- |
| 330 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
334 | 331 |
|
335 | 332 | There are classes of artists that can be placed at an anchored location
|
336 | 333 | in the Axes. A common example is the legend. This type of artist can
|
|
426 | 423 | to IdentityTransform by default.
|
427 | 424 |
|
428 | 425 | Using Complex Coordinates with Annotations
|
429 |
| ------------------------------------------- |
| 426 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
430 | 427 |
|
431 | 428 | The Annotation in matplotlib supports several types of coordinates as
|
432 | 429 | described in :ref:`annotations-tutorial`. For an advanced user who wants
|
|
517 | 514 | :doc:`/gallery/text_labels_and_annotations/annotation_demo`.
|
518 | 515 |
|
519 | 516 | Using ConnectionPatch
|
520 |
| ---------------------- |
| 517 | +~~~~~~~~~~~~~~~~~~~~~ |
521 | 518 |
|
522 | 519 | The ConnectionPatch is like an annotation without text. While the annotate
|
523 | 520 | function is recommended in most situations, the ConnectionPatch is useful when
|
|
546 | 543 |
|
547 | 544 |
|
548 | 545 | Advanced Topics
|
549 |
| -~~~~~~~~~~~~~~~ |
| 546 | +--------------- |
550 | 547 |
|
551 | 548 | Zoom effect between Axes
|
552 |
| ------------------------- |
| 549 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
553 | 550 |
|
554 | 551 | ``mpl_toolkits.axes_grid1.inset_locator`` defines some patch classes useful
|
555 | 552 | for interconnecting two axes. Understanding the code requires some
|
|
566 | 563 |
|
567 | 564 |
|
568 | 565 | Define Custom BoxStyle
|
569 |
| ----------------------- |
| 566 | +~~~~~~~~~~~~~~~~~~~~~~ |
570 | 567 |
|
571 | 568 | You can use a custom box style. The value for the ``boxstyle`` can be a
|
572 | 569 | callable object in the following forms.::
|
|
0 commit comments