

.. _sphx_glr_gallery_text_labels_and_annotations:

.. _text_labels_and_annotations:

Text, labels and annotations
============================



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib supports accented characters via TeX mathtext or Unicode.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_accented_text_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_accented_text.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Accented text</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Two methods are shown here, one using a short call to Figure.align_ylabels and the second a manual way to align the labels.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_align_ylabels_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_align_ylabels.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Align y-labels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to create a scale invariant angle annotation. It is often useful to mark angles between lines or inside shapes with a circular arc. While Matplotlib provides an Arc, an inherent problem when directly using it for such purposes is that an arc being circular in data space is not necessarily circular in display space. Also, the arc&#x27;s radius is often best defined in a coordinate system which is independent of the actual data coordinates - at least if you want to be able to freely zoom into your plot without the annotation growing to infinity.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_angle_annotation_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_angle_annotation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Scale invariant angle label</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to add angle annotations to bracket arrow styles created using FancyArrowPatch. angleA and angleB are measured from a vertical line as positive (to the left) or negative (to the right). Blue FancyArrowPatch arrows indicate the directions of angleA and angleB from the vertical and axes text annotate the angle sizes.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_angles_on_bracket_arrows_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_angles_on_bracket_arrows.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Angle annotations on bracket arrows</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use different coordinate systems for annotations. For a complete overview of the annotation capabilities, also see the annotation tutorial&lt;annotations&gt;.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_annotate_transform_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_annotate_transform.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotate transform</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to annotate a plot with an arrow pointing to provided coordinates. We modify the defaults of the arrow, to &quot;shrink&quot; it.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_annotation_basic_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_annotation_basic.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotating a plot</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The following examples show ways to annotate plots in Matplotlib. This includes highlighting specific points of interest and using various visual tools to call attention to this point. For a more complete and in-depth description of the annotation and text tools in Matplotlib, see the tutorial on annotation &lt;annotations&gt;.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_annotation_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_annotation_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotate plots</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to create an annotation on a polar graph.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_annotation_polar_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_annotation_polar.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotate polar plots</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Three ways of drawing arrows to encode arrow &quot;strength&quot; (e.g., transition probabilities in a Markov model) using arrow length, width, or alpha (opacity).">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_arrow_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_arrow_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Arrow Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib can wrap text automatically, but if it&#x27;s too long, the text will still be displayed slightly outside the boundaries of the axis.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_autowrap_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_autowrap.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Auto-wrap text</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Composing custom legends piece-by-piece.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_custom_legends_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_custom_legends.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compose custom legends</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib date plotting is done by converting date instances into days since an epoch (by default 1970-01-01T00:00:00). The matplotlib.dates module provides the converter functions date2num and num2date that convert datetime.datetime and numpy.datetime64 objects to and from Matplotlib&#x27;s internal representation.  These data types are registered with the unit conversion mechanism described in matplotlib.units, so the conversion happens automatically for the user. The registration process also sets the default tick locator and formatter for the axis to be AutoDateLocator and AutoDateFormatter.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_date_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_date.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Date tick labels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="AnnotationBbox creates an annotation using an OffsetBox, and provides more fine-grained control than Axes.annotate.  This example demonstrates the use of AnnotationBbox together with three different OffsetBoxes: TextArea, DrawingArea, and OffsetImage.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_demo_annotation_box_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_demo_annotation_box.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">AnnotationBbox demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="TextPath creates a Path that is the outline of the characters of a text. The resulting path can be employed e.g. as a clip path for an image.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_demo_text_path_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_demo_text_path.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Using a text as a Path</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of rotation_mode on the positioning of rotated text.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_demo_text_rotation_mode_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_demo_text_rotation_mode.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Text rotation mode</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="In this example, the differences between the \dfrac and \frac TeX macros are illustrated; in particular, the difference between display style and text style fractions when using Mathtex.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_dfrac_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_dfrac_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">The difference between \dfrac and \frac</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Use of the engineering Formatter.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_engineering_formatter_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_engineering_formatter.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Format ticks using engineering notation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Overview of the available ArrowStyle settings. These are used for the arrowstyle parameter of annotate and FancyArrowPatch.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_fancyarrow_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_fancyarrow_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Annotation arrow style reference</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to style text boxes using bbox parameters.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_fancytextbox_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_fancytextbox_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Styling text boxes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Rather than plotting a legend on each axis, a legend for all the artists on all the sub-axes of a figure can be plotted instead.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_figlegend_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_figlegend_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Figure legend demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="You can explicitly set which font family is picked up, either by specifying family names of fonts installed on user&#x27;s system, or generic-families (e.g., &#x27;serif&#x27;, &#x27;sans-serif&#x27;, &#x27;monospace&#x27;, &#x27;fantasy&#x27; or &#x27;cursive&#x27;), or a combination of both. (see text_props)">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_font_family_rc_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_font_family_rc.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Configure the font family</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Although it is usually not a good idea to explicitly point to a single ttf file for a font instance, you can do so by passing a pathlib.Path instance as the font parameter.  Note that passing paths as str\s is intentionally not supported, but you can simply wrap str\s in pathlib.Path\s as needed.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_font_file_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_font_file.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Using ttf font files</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib&#x27;s font support is provided by the FreeType library.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_font_table_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_font_table.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Font table</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Set font properties using setters.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_fonts_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_fonts_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Fonts demo (object-oriented style)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Set font properties using keyword arguments.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_fonts_demo_kw_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_fonts_demo_kw.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Fonts demo (keyword arguments)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Labelling subplots is relatively straightforward, and varies, so Matplotlib does not have a general method for doing this.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_label_subplots_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_label_subplots.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Labelling subplots</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Defining legend labels with plots.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_legend_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_legend.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Legend using pre-defined labels</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="There are many ways to create and customize legends in Matplotlib. Below we&#x27;ll show a few examples for how to do so.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_legend_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_legend_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Legend Demo</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Override basic methods so an artist can contain another artist.  In this case, the line contains a Text instance to label it.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_line_with_text_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_line_with_text.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Artist within an artist</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Convert texts to images">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_mathtext_asarray_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_mathtext_asarray.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Convert texts to images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Use Matplotlib&#x27;s internal LaTeX parser and layout engine.  For true LaTeX rendering, see the text.usetex option.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_mathtext_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_mathtext_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Mathtext</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Selected features of Matplotlib&#x27;s math rendering engine.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_mathtext_examples_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_mathtext_examples.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Mathematical expressions</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A simple example showcasing the new math_fontfamily parameter that can be used to change the family of fonts for each individual text element in a plot.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_mathtext_fontfamily_example_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_mathtext_fontfamily_example.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Math fontfamily</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Multiline">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_multiline_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_multiline.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Multiline</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="When decorating Axes with text boxes, two useful tricks are to place the text in axes coordinates (see transforms_tutorial), so the text doesn&#x27;t move around with changes in x or y limits.  You can also use the bbox property of text to surround the text with a Patch instance -- the bbox keyword argument takes a dictionary with keys that are Patch properties.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_placing_text_boxes_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_placing_text_boxes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Placing text boxes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The example strings together several Text objects with different properties (e.g., color or font), positioning each one after the other.  The first Text is created directly using text; all subsequent ones are created with annotate, which allows positioning the Text&#x27;s lower left corner at the lower right corner (``xy=(1, 0)``) of the previous one (``xycoords=text``).">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_rainbow_text_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_rainbow_text.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Concatenate text objects with different properties</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of STIX Fonts used in LaTeX rendering.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_stix_fonts_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_stix_fonts_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">STIX Fonts</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="You can use TeX to render all of your Matplotlib text by setting text.usetex to True.  This requires that you have TeX and the other dependencies described in the usetex tutorial properly installed on your system.  Matplotlib caches processed TeX expressions, so that only the first occurrence of an expression triggers a TeX compilation. Later occurrences reuse the rendered image from the cache and are thus faster.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_tex_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_tex_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Render math equations using TeX</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Texts are aligned relative to their anchor point depending on the properties horizontalalignment (default: left) and verticalalignment (default: baseline.)">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_text_alignment_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_text_alignment.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Text alignment</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Plotting text of many different kinds.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_text_commands_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_text_commands.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Text properties</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to share parameters across many text objects and labels by creating a dictionary of options passed across several functions.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_text_fontdict_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_text_fontdict.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Controlling style of text and labels using a dictionary</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Text objects in matplotlib are normally rotated with respect to the screen coordinate system (i.e., 45 degrees rotation plots text along a line that is in between horizontal and vertical no matter how the axes are changed).  However, at times one wants to rotate text with respect to something on the plot.  In this case, the correct angle won&#x27;t be the angle of that object in the plot coordinate system, but the angle that that object APPEARS in the screen coordinate system.  This angle can be determined automatically by setting the parameter transform_rotates_text, as shown in the example below.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_text_rotation_relative_to_line_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_text_rotation_relative_to_line.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Text rotation angle in data coordinates</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib can display plot titles centered, flush with the left side of a set of Axes, and flush with the right side of a set of Axes.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_titles_demo_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_titles_demo.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Title positioning</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="By default, tick labels at negative values are rendered using a `Unicode minus`__ (U+2212) rather than an ASCII hyphen (U+002D).  This can be controlled by setting axes.unicode_minus.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_unicode_minus_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_unicode_minus.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Unicode minus</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Comparison of text baselines computed for mathtext and usetex.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_usetex_baseline_test_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_usetex_baseline_test.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Usetex text baseline</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This script demonstrates that font effects specified in your pdftex.map are now supported in usetex mode.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_usetex_fonteffects_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_usetex_fonteffects.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Usetex font effects</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A watermark effect can be achieved by drawing a semi-transparent text.">

.. only:: html

  .. image:: /gallery/text_labels_and_annotations/images/thumb/sphx_glr_watermark_text_thumb.png
    :alt:

  :ref:`sphx_glr_gallery_text_labels_and_annotations_watermark_text.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Text watermark</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /gallery/text_labels_and_annotations/accented_text
   /gallery/text_labels_and_annotations/align_ylabels
   /gallery/text_labels_and_annotations/angle_annotation
   /gallery/text_labels_and_annotations/angles_on_bracket_arrows
   /gallery/text_labels_and_annotations/annotate_transform
   /gallery/text_labels_and_annotations/annotation_basic
   /gallery/text_labels_and_annotations/annotation_demo
   /gallery/text_labels_and_annotations/annotation_polar
   /gallery/text_labels_and_annotations/arrow_demo
   /gallery/text_labels_and_annotations/autowrap
   /gallery/text_labels_and_annotations/custom_legends
   /gallery/text_labels_and_annotations/date
   /gallery/text_labels_and_annotations/demo_annotation_box
   /gallery/text_labels_and_annotations/demo_text_path
   /gallery/text_labels_and_annotations/demo_text_rotation_mode
   /gallery/text_labels_and_annotations/dfrac_demo
   /gallery/text_labels_and_annotations/engineering_formatter
   /gallery/text_labels_and_annotations/fancyarrow_demo
   /gallery/text_labels_and_annotations/fancytextbox_demo
   /gallery/text_labels_and_annotations/figlegend_demo
   /gallery/text_labels_and_annotations/font_family_rc
   /gallery/text_labels_and_annotations/font_file
   /gallery/text_labels_and_annotations/font_table
   /gallery/text_labels_and_annotations/fonts_demo
   /gallery/text_labels_and_annotations/fonts_demo_kw
   /gallery/text_labels_and_annotations/label_subplots
   /gallery/text_labels_and_annotations/legend
   /gallery/text_labels_and_annotations/legend_demo
   /gallery/text_labels_and_annotations/line_with_text
   /gallery/text_labels_and_annotations/mathtext_asarray
   /gallery/text_labels_and_annotations/mathtext_demo
   /gallery/text_labels_and_annotations/mathtext_examples
   /gallery/text_labels_and_annotations/mathtext_fontfamily_example
   /gallery/text_labels_and_annotations/multiline
   /gallery/text_labels_and_annotations/placing_text_boxes
   /gallery/text_labels_and_annotations/rainbow_text
   /gallery/text_labels_and_annotations/stix_fonts_demo
   /gallery/text_labels_and_annotations/tex_demo
   /gallery/text_labels_and_annotations/text_alignment
   /gallery/text_labels_and_annotations/text_commands
   /gallery/text_labels_and_annotations/text_fontdict
   /gallery/text_labels_and_annotations/text_rotation_relative_to_line
   /gallery/text_labels_and_annotations/titles_demo
   /gallery/text_labels_and_annotations/unicode_minus
   /gallery/text_labels_and_annotations/usetex_baseline_test
   /gallery/text_labels_and_annotations/usetex_fonteffects
   /gallery/text_labels_and_annotations/watermark_text

