From 44a9190751a4b0e31a8baa0fa8d26a4319908aab Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 25 Feb 2019 14:21:09 +0100 Subject: [PATCH] Fix heading hierarchy in annotation tutorial. --- tutorials/text/annotations.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/tutorials/text/annotations.py b/tutorials/text/annotations.py index 278816dff190..e7cf5601929f 100644 --- a/tutorials/text/annotations.py +++ b/tutorials/text/annotations.py @@ -10,7 +10,7 @@ .. _annotations-tutorial: Basic annotation -================ +---------------- The uses of the basic :func:`~matplotlib.pyplot.text` will place text at an arbitrary position on the Axes. A common use case of text is to @@ -103,12 +103,11 @@ .. _plotting-guide-annotation: -Advanced Annotation -=================== - +Advanced Annotations +-------------------- Annotating with Text with Box ------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Let's start with a simple example. @@ -173,10 +172,8 @@ bb.set_boxstyle("rarrow,pad=0.6") - - Annotating with Arrow ---------------------- +~~~~~~~~~~~~~~~~~~~~~ The :func:`~matplotlib.pyplot.annotate` function in the pyplot module (or annotate method of the Axes class) is used to draw an arrow @@ -330,7 +327,7 @@ Placing Artist at the anchored location of the Axes ---------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are classes of artists that can be placed at an anchored location in the Axes. A common example is the legend. This type of artist can @@ -426,7 +423,7 @@ to IdentityTransform by default. Using Complex Coordinates with Annotations ------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Annotation in matplotlib supports several types of coordinates as described in :ref:`annotations-tutorial`. For an advanced user who wants @@ -517,7 +514,7 @@ :doc:`/gallery/text_labels_and_annotations/annotation_demo`. Using ConnectionPatch ---------------------- +~~~~~~~~~~~~~~~~~~~~~ The ConnectionPatch is like an annotation without text. While the annotate function is recommended in most situations, the ConnectionPatch is useful when @@ -546,10 +543,10 @@ Advanced Topics -~~~~~~~~~~~~~~~ +--------------- Zoom effect between Axes ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~ ``mpl_toolkits.axes_grid1.inset_locator`` defines some patch classes useful for interconnecting two axes. Understanding the code requires some @@ -566,7 +563,7 @@ Define Custom BoxStyle ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ You can use a custom box style. The value for the ``boxstyle`` can be a callable object in the following forms.::