image imagewidth (px) 75 2.22k | code stringlengths 300 16.2k | example_id stringlengths 28 79 | figure_index int64 0 26 | figure_name stringclasses 28
values | title stringlengths 38 94 | example_page_url stringlengths 61 195 | source_url stringlengths 80 111 | source_relpath stringlengths 6 37 | category_hint stringclasses 24
values | status stringclasses 1
value | num_figures int64 1 27 | error null |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
"""
================================================
Combine two subplots using subplots and GridSpec
================================================
Sometimes we want to combine two subplots in an Axes layout created with
`~.Figure.subplots`. We can get the `~.gridspec.GridSpec` from the Axes
and then remove the co... | stable__gallery__subplots_axes_and_figures__gridspec_and_subplots | 0 | figure_000.png | Combine two subplots using subplots and GridSpec — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_and_subplots.html#sphx-glr-download-gallery-subplots-axes-and-figures-gridspec-and-subplots-py | https://matplotlib.org/stable/_downloads/1e01451841b499da6640677973bcab50/gridspec_and_subplots.py | gridspec_and_subplots.py | subplots_axes_and_figures | ok | 1 | null | |
"""
========================================
GridSpec with variable sizes and spacing
========================================
This example demonstrates the use of `.GridSpec` to generate subplots,
the control of the relative sizes of subplots with *width_ratios* and
*height_ratios*, and the control of the spacing aro... | stable__gallery__subplots_axes_and_figures__gridspec_customization | 0 | figure_000.png | GridSpec with variable sizes and spacing — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_customization.html#sphx-glr-download-gallery-subplots-axes-and-figures-gridspec-customization-py | https://matplotlib.org/stable/_downloads/d2a676c30804b3fae8ca5b0fd74cebe1/gridspec_customization.py | gridspec_customization.py | subplots_axes_and_figures | ok | 2 | null | |
"""
========================================
GridSpec with variable sizes and spacing
========================================
This example demonstrates the use of `.GridSpec` to generate subplots,
the control of the relative sizes of subplots with *width_ratios* and
*height_ratios*, and the control of the spacing aro... | stable__gallery__subplots_axes_and_figures__gridspec_customization | 1 | figure_001.png | GridSpec with variable sizes and spacing — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_customization.html#sphx-glr-download-gallery-subplots-axes-and-figures-gridspec-customization-py | https://matplotlib.org/stable/_downloads/d2a676c30804b3fae8ca5b0fd74cebe1/gridspec_customization.py | gridspec_customization.py | subplots_axes_and_figures | ok | 2 | null | |
"""
=============================================
Gridspec for multi-column/row subplot layouts
=============================================
`.GridSpec` is a flexible way to layout
subplot grids. Here is an example with a 3x3 grid, and
axes spanning all three columns, two columns, and two rows.
"""
import matplotli... | stable__gallery__subplots_axes_and_figures__gridspec_multicolumn | 0 | figure_000.png | Gridspec for multi-column/row subplot layouts — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_multicolumn.html#sphx-glr-download-gallery-subplots-axes-and-figures-gridspec-multicolumn-py | https://matplotlib.org/stable/_downloads/d13b9f7b735ed9cdf774ff1d83114d08/gridspec_multicolumn.py | gridspec_multicolumn.py | subplots_axes_and_figures | ok | 1 | null | |
"""
================
Nested Gridspecs
================
GridSpecs can be nested, so that a subplot from a parent GridSpec can
set the position for a nested grid of subplots.
Note that the same functionality can be achieved more directly with
`~.Figure.subfigures`; see
:doc:`/gallery/subplots_axes_and_figures/subfigure... | stable__gallery__subplots_axes_and_figures__gridspec_nested | 0 | figure_000.png | Nested Gridspecs — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_nested.html#sphx-glr-download-gallery-subplots-axes-and-figures-gridspec-nested-py | https://matplotlib.org/stable/_downloads/6f740ff878eb7af08d204edefcd427ba/gridspec_nested.py | gridspec_nested.py | subplots_axes_and_figures | ok | 1 | null | |
"""
=============
Inverted axis
=============
This example demonstrates two ways to invert the direction of an axis:
- If you want to set *explicit axis limits* anyway, e.g. via `~.Axes.set_xlim`, you
can swap the limit values: ``set_xlim(4, 0)`` instead of ``set_xlim(0, 4)``.
- Use `.Axis.set_inverted` if you only... | stable__gallery__subplots_axes_and_figures__invert_axes | 0 | figure_000.png | Inverted axis — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/invert_axes.html#sphx-glr-download-gallery-subplots-axes-and-figures-invert-axes-py | https://matplotlib.org/stable/_downloads/d1b6738fcf4b442f210407389ef9e181/invert_axes.py | invert_axes.py | subplots_axes_and_figures | ok | 1 | null | |
"""
=================================
Manage multiple figures in pyplot
=================================
`matplotlib.pyplot` uses the concept of a *current figure* and *current Axes*.
Figures are identified via a figure number that is passed to `~.pyplot.figure`.
The figure with the given number is set as *current fi... | stable__gallery__subplots_axes_and_figures__multiple_figs_demo | 0 | figure_000.png | Manage multiple figures in pyplot — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/multiple_figs_demo.html#sphx-glr-download-gallery-subplots-axes-and-figures-multiple-figs-demo-py | https://matplotlib.org/stable/_downloads/059067d4247dad92d898873389274388/multiple_figs_demo.py | multiple_figs_demo.py | subplots_axes_and_figures | ok | 2 | null | |
"""
=================================
Manage multiple figures in pyplot
=================================
`matplotlib.pyplot` uses the concept of a *current figure* and *current Axes*.
Figures are identified via a figure number that is passed to `~.pyplot.figure`.
The figure with the given number is set as *current fi... | stable__gallery__subplots_axes_and_figures__multiple_figs_demo | 1 | figure_001.png | Manage multiple figures in pyplot — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/multiple_figs_demo.html#sphx-glr-download-gallery-subplots-axes-and-figures-multiple-figs-demo-py | https://matplotlib.org/stable/_downloads/059067d4247dad92d898873389274388/multiple_figs_demo.py | multiple_figs_demo.py | subplots_axes_and_figures | ok | 2 | null | |
"""
==============
Secondary Axis
==============
Sometimes we want a secondary axis on a plot, for instance to convert
radians to degrees on the same plot. We can do this by making a child
axes with only one axis visible via `.axes.Axes.secondary_xaxis` and
`.axes.Axes.secondary_yaxis`. This secondary axis can have ... | stable__gallery__subplots_axes_and_figures__secondary_axis | 0 | figure_000.png | Secondary Axis — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/secondary_axis.html#sphx-glr-download-gallery-subplots-axes-and-figures-secondary-axis-py | https://matplotlib.org/stable/_downloads/e9052d0215fa39419437bd7cf90e02cb/secondary_axis.py | secondary_axis.py | subplots_axes_and_figures | ok | 5 | null | |
"""
===========================
Share axis limits and views
===========================
It's common to make two or more plots which share an axis, e.g., two subplots
with time as a common axis. When you pan and zoom around on one, you want the
other to move around with you. To facilitate this, matplotlib Axes suppor... | stable__gallery__subplots_axes_and_figures__share_axis_lims_views | 0 | figure_000.png | Share axis limits and views — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/share_axis_lims_views.html#sphx-glr-download-gallery-subplots-axes-and-figures-share-axis-lims-views-py | https://matplotlib.org/stable/_downloads/e29deef9b0546c8b5558462757e2cbaa/share_axis_lims_views.py | share_axis_lims_views.py | subplots_axes_and_figures | ok | 1 | null | |
"""
===========
Shared axis
===========
You can share the x- or y-axis limits for one axis with another by
passing an `~.axes.Axes` instance as a *sharex* or *sharey* keyword argument.
Changing the axis limits on one Axes will be reflected automatically
in the other, and vice-versa, so when you navigate with the tool... | stable__gallery__subplots_axes_and_figures__shared_axis_demo | 0 | figure_000.png | Shared axis — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/shared_axis_demo.html#sphx-glr-download-gallery-subplots-axes-and-figures-shared-axis-demo-py | https://matplotlib.org/stable/_downloads/268bf2a830c1140e907940f9c32a672b/shared_axis_demo.py | shared_axis_demo.py | subplots_axes_and_figures | ok | 1 | null | |
"""
=================
Figure subfigures
=================
Sometimes it is desirable to have a figure with two different layouts in it.
This can be achieved with
:doc:`nested gridspecs</gallery/subplots_axes_and_figures/gridspec_nested>`,
but having a virtual figure with its own artists is helpful, so
Matplotlib also h... | stable__gallery__subplots_axes_and_figures__subfigures | 0 | figure_000.png | Figure subfigures — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subfigures.html#sphx-glr-download-gallery-subplots-axes-and-figures-subfigures-py | https://matplotlib.org/stable/_downloads/a60fd01ed70531c8e03f55f32b6c55ff/subfigures.py | subfigures.py | subplots_axes_and_figures | ok | 4 | null | |
"""
=================
Multiple subplots
=================
Simple demo with multiple subplots.
For more options, see :doc:`/gallery/subplots_axes_and_figures/subplots_demo`.
.. redirect-from:: /gallery/subplots_axes_and_figures/subplot_demo
"""
import matplotlib.pyplot as plt
import numpy as np
# Create some fake d... | stable__gallery__subplots_axes_and_figures__subplot | 0 | figure_000.png | Multiple subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplot.html#sphx-glr-download-gallery-subplots-axes-and-figures-subplot-py | https://matplotlib.org/stable/_downloads/9a9c8ab515a92a91eda7dac9bcb348ec/subplot.py | subplot.py | subplots_axes_and_figures | ok | 2 | null | |
"""
============
subplot2grid
============
This example demonstrates the use of `.pyplot.subplot2grid` to generate
subplots. Using `.GridSpec`, as demonstrated in
:doc:`/gallery/subplots_axes_and_figures/gridspec_customization` is
generally preferred.
.. redirect-from:: /gallery/userdemo/demo_gridspec01
"""
import ... | stable__gallery__subplots_axes_and_figures__subplot2grid | 0 | figure_000.png | subplot2grid — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplot2grid.html#subplot2grid | https://matplotlib.org/stable/_downloads/4be179670089e2aef92ee35952df0b04/subplot2grid.py | subplot2grid.py | subplots_axes_and_figures | ok | 1 | null | |
"""
=============================
Subplots spacings and margins
=============================
Adjusting the spacing of margins and subplots using `.pyplot.subplots_adjust`.
.. note::
There is also a tool window to adjust the margins and spacings of displayed
figures interactively. It can be opened via the tool... | stable__gallery__subplots_axes_and_figures__subplots_adjust | 0 | figure_000.png | Subplots spacings and margins — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_adjust.html#subplots-spacings-and-margins | https://matplotlib.org/stable/_downloads/ae98d6400556dc85e7f24d68d8480dd7/subplots_adjust.py | subplots_adjust.py | subplots_axes_and_figures | ok | 1 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 0 | figure_000.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 1 | figure_001.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 2 | figure_002.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 3 | figure_003.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 4 | figure_004.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 5 | figure_005.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 6 | figure_006.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 7 | figure_007.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 8 | figure_008.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 9 | figure_009.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 10 | figure_010.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 11 | figure_011.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===============================================
Create multiple subplots using ``plt.subplots``
===============================================
`.pyplot.subplots` creates a figure and a grid of subplots with a single call,
while providing reasonable control over how the individual plots are created.
For more advan... | stable__gallery__subplots_axes_and_figures__subplots_demo | 12 | figure_012.png | Create multiple subplots using plt.subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/subplots_demo.html#stacking-subplots-in-two-directions | https://matplotlib.org/stable/_downloads/5c62f1316efb781bfb7c3acccd2b688c/subplots_demo.py | subplots_demo.py | subplots_axes_and_figures | ok | 13 | null | |
"""
===========================
Plots with different scales
===========================
Two plots on the same Axes with different left and right scales.
The trick is to use *two different Axes* that share the same *x* axis.
You can use separate `matplotlib.ticker` formatters and locators as
desired since the two Axes... | stable__gallery__subplots_axes_and_figures__two_scales | 0 | figure_000.png | Plots with different scales — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/two_scales.html#sphx-glr-download-gallery-subplots-axes-and-figures-two-scales-py | https://matplotlib.org/stable/_downloads/dabc4913b2e476e7980afa4897896ece/two_scales.py | two_scales.py | subplots_axes_and_figures | ok | 1 | null | |
"""
======================
Zoom region inset Axes
======================
Example of an inset Axes and a rectangle showing where the zoom is located.
"""
import numpy as np
from matplotlib import cbook
from matplotlib import pyplot as plt
fig, ax = plt.subplots()
# make data
Z = cbook.get_sample_data("axes_grid/biv... | stable__gallery__subplots_axes_and_figures__zoom_inset_axes | 0 | figure_000.png | Zoom region inset Axes — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/subplots_axes_and_figures/zoom_inset_axes.html#zoom-region-inset-axes | https://matplotlib.org/stable/_downloads/7600459cba10d19716daad4a919e2705/zoom_inset_axes.py | zoom_inset_axes.py | subplots_axes_and_figures | ok | 1 | null | |
r"""
=============
Accented text
=============
Matplotlib supports accented characters via TeX mathtext or Unicode.
Using mathtext, the following accents are provided: \\hat, \\breve, \\grave,
\\bar, \\acute, \\tilde, \\vec, \\dot, \\ddot. All of them have the same
syntax, e.g. \\bar{o} yields "o overbar", \\ddot{o}... | stable__gallery__text_labels_and_annotations__accented_text | 0 | figure_000.png | Accented text — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/accented_text.html#sphx-glr-download-gallery-text-labels-and-annotations-accented-text-py | https://matplotlib.org/stable/_downloads/6fd60662b3bc1e803fc9f7e8e24a9025/accented_text.py | accented_text.py | text_labels_and_annotations | ok | 2 | null | |
r"""
=============
Accented text
=============
Matplotlib supports accented characters via TeX mathtext or Unicode.
Using mathtext, the following accents are provided: \\hat, \\breve, \\grave,
\\bar, \\acute, \\tilde, \\vec, \\dot, \\ddot. All of them have the same
syntax, e.g. \\bar{o} yields "o overbar", \\ddot{o}... | stable__gallery__text_labels_and_annotations__accented_text | 1 | figure_001.png | Accented text — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/accented_text.html#sphx-glr-download-gallery-text-labels-and-annotations-accented-text-py | https://matplotlib.org/stable/_downloads/6fd60662b3bc1e803fc9f7e8e24a9025/accented_text.py | accented_text.py | text_labels_and_annotations | ok | 2 | null | |
"""
==============
Align y-labels
==============
Two methods are shown here, one using a short call to `.Figure.align_ylabels`
and the second a manual way to align the labels.
.. redirect-from:: /gallery/pyplots/align_ylabels
"""
import matplotlib.pyplot as plt
import numpy as np
def make_plot(axs):
box = dict(... | stable__gallery__text_labels_and_annotations__align_ylabels | 0 | figure_000.png | Align y-labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/align_ylabels.html#sphx-glr-download-gallery-text-labels-and-annotations-align-ylabels-py | https://matplotlib.org/stable/_downloads/a7cb4dbd7d8bb0c0adb3f15a2ae98b68/align_ylabels.py | align_ylabels.py | text_labels_and_annotations | ok | 2 | null | |
"""
===========================
Scale invariant angle label
===========================
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 `~.patches.Arc`, an inherent problem when direc... | stable__gallery__text_labels_and_annotations__angle_annotation | 0 | figure_000.png | Scale invariant angle label — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/angle_annotation.html#usage | https://matplotlib.org/stable/_downloads/c293090f798b3d244c3be9d67f90f728/angle_annotation.py | angle_annotation.py | text_labels_and_annotations | ok | 2 | null | |
"""
===========================
Scale invariant angle label
===========================
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 `~.patches.Arc`, an inherent problem when direc... | stable__gallery__text_labels_and_annotations__angle_annotation | 1 | figure_001.png | Scale invariant angle label — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/angle_annotation.html#usage | https://matplotlib.org/stable/_downloads/c293090f798b3d244c3be9d67f90f728/angle_annotation.py | angle_annotation.py | text_labels_and_annotations | ok | 2 | null | |
"""
===================================
Angle annotations on bracket arrows
===================================
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... | stable__gallery__text_labels_and_annotations__angles_on_bracket_arrows | 0 | figure_000.png | Angle annotations on bracket arrows — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/angles_on_bracket_arrows.html#sphx-glr-download-gallery-text-labels-and-annotations-angles-on-bracket-arrows-py | https://matplotlib.org/stable/_downloads/4af2c72e985d6771b93719ce29b0b6ac/angles_on_bracket_arrows.py | angles_on_bracket_arrows.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================
Annotate transform
==================
This example shows how to use different coordinate systems for annotations.
For a complete overview of the annotation capabilities, also see the
:ref:`annotation tutorial<annotations>`.
.. redirect-from:: /gallery/pyplots/annotate_transform
"""
import matp... | stable__gallery__text_labels_and_annotations__annotate_transform | 0 | figure_000.png | Annotate transform — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotate_transform.html#sphx-glr-download-gallery-text-labels-and-annotations-annotate-transform-py | https://matplotlib.org/stable/_downloads/769c988a8b983293c51e2052df2b2526/annotate_transform.py | annotate_transform.py | text_labels_and_annotations | ok | 1 | null | |
"""
=================
Annotating a plot
=================
This example shows how to annotate a plot with an arrow pointing to provided
coordinates. We modify the defaults of the arrow, to "shrink" it.
For a complete overview of the annotation capabilities, also see the
:ref:`annotation tutorial<annotations>`.
.. red... | stable__gallery__text_labels_and_annotations__annotation_basic | 0 | figure_000.png | Annotating a plot — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_basic.html#sphx-glr-download-gallery-text-labels-and-annotations-annotation-basic-py | https://matplotlib.org/stable/_downloads/6233ee91b5659f73e6087e12c2079d1d/annotation_basic.py | annotation_basic.py | text_labels_and_annotations | ok | 1 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 0 | figure_000.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 1 | figure_001.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 2 | figure_002.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 3 | figure_003.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 4 | figure_004.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
==============
Annotate plots
==============
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 Matp... | stable__gallery__text_labels_and_annotations__annotation_demo | 5 | figure_005.png | Annotate plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_demo.html#using-multiple-coordinate-systems-and-axis-types | https://matplotlib.org/stable/_downloads/d9affd4778c6449c175e11db4270dc15/annotation_demo.py | annotation_demo.py | text_labels_and_annotations | ok | 6 | null | |
"""
====================
Annotate polar plots
====================
This example shows how to create an annotation on a polar graph.
For a complete overview of the annotation capabilities, also see the
:ref:`annotations`.
.. redirect-from:: /gallery/pyplots/annotation_polar
"""
import matplotlib.pyplot as plt
import ... | stable__gallery__text_labels_and_annotations__annotation_polar | 0 | figure_000.png | Annotate polar plots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/annotation_polar.html#sphx-glr-download-gallery-text-labels-and-annotations-annotation-polar-py | https://matplotlib.org/stable/_downloads/ffc150ccbb9ee266a1f585c63bad2603/annotation_polar.py | annotation_polar.py | text_labels_and_annotations | ok | 1 | null | |
"""
==========
Arrow Demo
==========
Three ways of drawing arrows to encode arrow "strength" (e.g., transition
probabilities in a Markov model) using arrow length, width, or alpha (opacity).
"""
import itertools
import matplotlib.pyplot as plt
import numpy as np
def make_arrow_graph(ax, data, size=4, display='leng... | stable__gallery__text_labels_and_annotations__arrow_demo | 0 | figure_000.png | Arrow Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/arrow_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-arrow-demo-py | https://matplotlib.org/stable/_downloads/2d636f361d6c4d193b00e03241a15176/arrow_demo.py | arrow_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
==============
Auto-wrap text
==============
Matplotlib can wrap text automatically, but if it's too long, the text will
still be displayed slightly outside the boundaries of the axis.
Note: Auto-wrapping does not work together with
``savefig(..., bbox_inches='tight')``. The 'tight' setting rescales the canvas
to... | stable__gallery__text_labels_and_annotations__autowrap | 0 | figure_000.png | Auto-wrap text — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/autowrap.html#sphx-glr-download-gallery-text-labels-and-annotations-autowrap-py | https://matplotlib.org/stable/_downloads/66fbde84b16e47d48c1453370b36aa55/autowrap.py | autowrap.py | text_labels_and_annotations | ok | 1 | null | |
"""
======================
Compose custom legends
======================
Composing custom legends piece-by-piece.
.. note::
For more information on creating and customizing legends, see the following
pages:
* :ref:`legend_guide`
* :doc:`/gallery/text_labels_and_annotations/legend_demo`
Sometimes you do... | stable__gallery__text_labels_and_annotations__custom_legends | 0 | figure_000.png | Compose custom legends — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/custom_legends.html#sphx-glr-download-gallery-text-labels-and-annotations-custom-legends-py | https://matplotlib.org/stable/_downloads/dcd6af3a3384b030d707536e9a7319f3/custom_legends.py | custom_legends.py | text_labels_and_annotations | ok | 3 | null | |
"""
======================
Compose custom legends
======================
Composing custom legends piece-by-piece.
.. note::
For more information on creating and customizing legends, see the following
pages:
* :ref:`legend_guide`
* :doc:`/gallery/text_labels_and_annotations/legend_demo`
Sometimes you do... | stable__gallery__text_labels_and_annotations__custom_legends | 1 | figure_001.png | Compose custom legends — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/custom_legends.html#sphx-glr-download-gallery-text-labels-and-annotations-custom-legends-py | https://matplotlib.org/stable/_downloads/dcd6af3a3384b030d707536e9a7319f3/custom_legends.py | custom_legends.py | text_labels_and_annotations | ok | 3 | null | |
"""
======================
Compose custom legends
======================
Composing custom legends piece-by-piece.
.. note::
For more information on creating and customizing legends, see the following
pages:
* :ref:`legend_guide`
* :doc:`/gallery/text_labels_and_annotations/legend_demo`
Sometimes you do... | stable__gallery__text_labels_and_annotations__custom_legends | 2 | figure_002.png | Compose custom legends — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/custom_legends.html#sphx-glr-download-gallery-text-labels-and-annotations-custom-legends-py | https://matplotlib.org/stable/_downloads/dcd6af3a3384b030d707536e9a7319f3/custom_legends.py | custom_legends.py | text_labels_and_annotations | ok | 3 | null | |
"""
================
Date tick labels
================
Matplotlib date plotting is done by converting date instances into
days since an epoch (by default 1970-01-01T00:00:00). The
:mod:`matplotlib.dates` module provides the converter functions `.date2num`
and `.num2date` that convert `datetime.datetime` and `numpy.dat... | stable__gallery__text_labels_and_annotations__date | 0 | figure_000.png | Date tick labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/date.html#sphx-glr-download-gallery-text-labels-and-annotations-date-py | https://matplotlib.org/stable/_downloads/6b4d05c6b8388c1af173947c30162317/date.py | date.py | text_labels_and_annotations | ok | 1 | null | |
"""
===================
AnnotationBbox demo
===================
`.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 `... | stable__gallery__text_labels_and_annotations__demo_annotation_box | 0 | figure_000.png | AnnotationBbox demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/demo_annotation_box.html#sphx-glr-download-gallery-text-labels-and-annotations-demo-annotation-box-py | https://matplotlib.org/stable/_downloads/8f8964e173a4b95160a8595de75794d4/demo_annotation_box.py | demo_annotation_box.py | text_labels_and_annotations | ok | 1 | null | |
"""
======================
Using a text as a Path
======================
`~matplotlib.text.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.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.cbook imp... | stable__gallery__text_labels_and_annotations__demo_text_path | 0 | figure_000.png | Using a text as a Path — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/demo_text_path.html#using-a-text-as-a-path | https://matplotlib.org/stable/_downloads/986997c8a8bb17b365f417251e167454/demo_text_path.py | demo_text_path.py | text_labels_and_annotations | ok | 1 | null | |
r"""
==================
Text rotation mode
==================
This example illustrates the effect of ``rotation_mode`` on the positioning
of rotated text.
Rotated `.Text`\s are created by passing the parameter ``rotation`` to
the constructor or the Axes' method `~.axes.Axes.text`.
The actual positioning depends on t... | stable__gallery__text_labels_and_annotations__demo_text_rotation_mode | 0 | figure_000.png | Text rotation mode — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/demo_text_rotation_mode.html#text-rotation-mode | https://matplotlib.org/stable/_downloads/58345f9f57bb466b821c32d7c2c5509e/demo_text_rotation_mode.py | demo_text_rotation_mode.py | text_labels_and_annotations | ok | 1 | null | |
r"""
=========================================
The difference between \\dfrac and \\frac
=========================================
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.... | stable__gallery__text_labels_and_annotations__dfrac_demo | 0 | figure_000.png | The difference between \dfrac and \frac — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/dfrac_demo.html#the-difference-between-dfrac-and-frac | https://matplotlib.org/stable/_downloads/468271b27d3e686f08b0ec06f8327ef9/dfrac_demo.py | dfrac_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
=======================================
Format ticks using engineering notation
=======================================
Use of the engineering Formatter.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import EngFormatter
# Fixing random state for reproducibility
prng = np.random.R... | stable__gallery__text_labels_and_annotations__engineering_formatter | 0 | figure_000.png | Format ticks using engineering notation — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/engineering_formatter.html#sphx-glr-download-gallery-text-labels-and-annotations-engineering-formatter-py | https://matplotlib.org/stable/_downloads/9edc866078c8d2f5c4b1d68a9856d0fc/engineering_formatter.py | engineering_formatter.py | text_labels_and_annotations | ok | 1 | null | |
"""
================================
Annotation arrow style reference
================================
Overview of the available `.ArrowStyle` settings. These are used for the *arrowstyle*
parameter of `~.Axes.annotate` and `.FancyArrowPatch`.
Each style can be configured with a set of parameters, which are stated al... | stable__gallery__text_labels_and_annotations__fancyarrow_demo | 0 | figure_000.png | Annotation arrow style reference — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/fancyarrow_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-fancyarrow-demo-py | https://matplotlib.org/stable/_downloads/5c12d4b66c26fc9c8cdfd42f3e8008a7/fancyarrow_demo.py | fancyarrow_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================
Styling text boxes
==================
This example shows how to style text boxes using *bbox* parameters.
"""
import matplotlib.pyplot as plt
plt.text(0.6, 0.7, "eggs", size=50, rotation=30.,
ha="center", va="center",
bbox=dict(boxstyle="round",
ec=(1., 0.5,... | stable__gallery__text_labels_and_annotations__fancytextbox_demo | 0 | figure_000.png | Styling text boxes — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/fancytextbox_demo.html#styling-text-boxes | https://matplotlib.org/stable/_downloads/2d93c172a0e3842ed12e6211628fe0f5/fancytextbox_demo.py | fancytextbox_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================
Figure legend demo
==================
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.
"""
import matplotlib.pyplot as plt
import numpy as np
fig, axs = plt.subplots(1, 2, layout='constrained')
x = np.arange(0.0, ... | stable__gallery__text_labels_and_annotations__figlegend_demo | 0 | figure_000.png | Figure legend demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/figlegend_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-figlegend-demo-py | https://matplotlib.org/stable/_downloads/5f2c35d6ffe75884c672ca725851c0f4/figlegend_demo.py | figlegend_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
=========================
Configure the font family
=========================
You can explicitly set which font family is picked up, either by specifying
family names of fonts installed on user's system, or generic-families
(e.g., 'serif', 'sans-serif', 'monospace', 'fantasy' or 'cursive'),
or a combination of bot... | stable__gallery__text_labels_and_annotations__font_family_rc | 0 | figure_000.png | Configure the font family — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc.html#sphx-glr-download-gallery-text-labels-and-annotations-font-family-rc-py | https://matplotlib.org/stable/_downloads/855769f70f221ad26f2f3ef0c960bb67/font_family_rc.py | font_family_rc.py | text_labels_and_annotations | ok | 4 | null | |
r"""
====================
Using ttf font files
====================
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 yo... | stable__gallery__text_labels_and_annotations__font_file | 0 | figure_000.png | Using ttf font files — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_file.html#using-ttf-font-files | https://matplotlib.org/stable/_downloads/f3eab81c1f29bec924d1fb4a0f5519d5/font_file.py | font_file.py | text_labels_and_annotations | ok | 1 | null | |
"""
==========
Font table
==========
Matplotlib's font support is provided by the FreeType library.
Here, we use `~.Axes.table` to draw a table that shows the glyphs by Unicode
codepoint. For brevity, the table only contains the first 256 glyphs.
The example is a full working script. You can download it and use it t... | stable__gallery__text_labels_and_annotations__font_table | 0 | figure_000.png | Font table — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_table.html#sphx-glr-download-gallery-text-labels-and-annotations-font-table-py | https://matplotlib.org/stable/_downloads/bc9735ba2ce09278809c68b7f82bdee8/font_table.py | font_table.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================================
Fonts demo (object-oriented style)
==================================
Set font properties using setters.
See :doc:`fonts_demo_kw` to achieve the same effect using keyword arguments.
"""
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
fig = p... | stable__gallery__text_labels_and_annotations__fonts_demo | 0 | figure_000.png | Fonts demo (object-oriented style) — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/fonts_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-fonts-demo-py | https://matplotlib.org/stable/_downloads/a07ccc7ac96893982528857f66715b4d/fonts_demo.py | fonts_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
==============================
Fonts demo (keyword arguments)
==============================
Set font properties using keyword arguments.
See :doc:`fonts_demo` to achieve the same effect using setters.
"""
import matplotlib.pyplot as plt
fig = plt.figure()
alignment = {'horizontalalignment': 'center', 'vertical... | stable__gallery__text_labels_and_annotations__fonts_demo_kw | 0 | figure_000.png | Fonts demo (keyword arguments) — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/fonts_demo_kw.html#sphx-glr-download-gallery-text-labels-and-annotations-fonts-demo-kw-py | https://matplotlib.org/stable/_downloads/9c5f5b75a1364025604ffb07f11a7118/fonts_demo_kw.py | fonts_demo_kw.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================
Labelling subplots
==================
Labelling subplots is relatively straightforward, and varies, so Matplotlib
does not have a general method for doing this.
We showcase two methods to position text at a given physical offset (in
fontsize units or in points) away from a corner of the Axes: o... | stable__gallery__text_labels_and_annotations__label_subplots | 0 | figure_000.png | Labelling subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/label_subplots.html#sphx-glr-download-gallery-text-labels-and-annotations-label-subplots-py | https://matplotlib.org/stable/_downloads/827a1d72743e3fc3edb7c08e7b5a4f5c/label_subplots.py | label_subplots.py | text_labels_and_annotations | ok | 3 | null | |
"""
==================
Labelling subplots
==================
Labelling subplots is relatively straightforward, and varies, so Matplotlib
does not have a general method for doing this.
We showcase two methods to position text at a given physical offset (in
fontsize units or in points) away from a corner of the Axes: o... | stable__gallery__text_labels_and_annotations__label_subplots | 1 | figure_001.png | Labelling subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/label_subplots.html#sphx-glr-download-gallery-text-labels-and-annotations-label-subplots-py | https://matplotlib.org/stable/_downloads/827a1d72743e3fc3edb7c08e7b5a4f5c/label_subplots.py | label_subplots.py | text_labels_and_annotations | ok | 3 | null | |
"""
==================
Labelling subplots
==================
Labelling subplots is relatively straightforward, and varies, so Matplotlib
does not have a general method for doing this.
We showcase two methods to position text at a given physical offset (in
fontsize units or in points) away from a corner of the Axes: o... | stable__gallery__text_labels_and_annotations__label_subplots | 2 | figure_002.png | Labelling subplots — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/label_subplots.html#sphx-glr-download-gallery-text-labels-and-annotations-label-subplots-py | https://matplotlib.org/stable/_downloads/827a1d72743e3fc3edb7c08e7b5a4f5c/label_subplots.py | label_subplots.py | text_labels_and_annotations | ok | 3 | null | |
"""
===============================
Legend using pre-defined labels
===============================
Defining legend labels with plots.
"""
import matplotlib.pyplot as plt
import numpy as np
# Make some fake data.
a = b = np.arange(0, 3, .02)
c = np.exp(a)
d = c[::-1]
# Create plots with pre-defined labels.
fig, ax... | stable__gallery__text_labels_and_annotations__legend | 0 | figure_000.png | Legend using pre-defined labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/legend.html#sphx-glr-download-gallery-text-labels-and-annotations-legend-py | https://matplotlib.org/stable/_downloads/4ba945f00bae04f2da137e370ec93cb6/legend.py | legend.py | text_labels_and_annotations | ok | 1 | null | |
"""
===========
Legend Demo
===========
There are many ways to create and customize legends in Matplotlib. Below
we'll show a few examples for how to do so.
First we'll show off how to make a legend for specific lines.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.collections as mcol
from... | stable__gallery__text_labels_and_annotations__legend_demo | 0 | figure_000.png | Legend Demo — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/legend_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-legend-demo-py | https://matplotlib.org/stable/_downloads/6aa8e5919ce32e892d549350231357cd/legend_demo.py | legend_demo.py | text_labels_and_annotations | ok | 5 | null | |
"""
=======================
Artist within an artist
=======================
Override basic methods so an artist can contain another
artist. In this case, the line contains a Text instance to label it.
"""
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.lines as lines
import matplotlib.text as mt... | stable__gallery__text_labels_and_annotations__line_with_text | 0 | figure_000.png | Artist within an artist — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/line_with_text.html#sphx-glr-download-gallery-text-labels-and-annotations-line-with-text-py | https://matplotlib.org/stable/_downloads/41b07a606d47877f7b24b3b5e4dcbca8/line_with_text.py | line_with_text.py | text_labels_and_annotations | ok | 1 | null | |
"""
=======================
Convert texts to images
=======================
"""
from io import BytesIO
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from matplotlib.transforms import IdentityTransform
def text_to_rgba(s, *, dpi, **kwargs):
# To convert a text string to an image, we can:
... | stable__gallery__text_labels_and_annotations__mathtext_asarray | 0 | figure_000.png | Convert texts to images — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/mathtext_asarray.html#sphx-glr-download-gallery-text-labels-and-annotations-mathtext-asarray-py | https://matplotlib.org/stable/_downloads/fb498376a4f52d3e7e49f9367638b72d/mathtext_asarray.py | mathtext_asarray.py | text_labels_and_annotations | ok | 1 | null | |
"""
========
Mathtext
========
Use Matplotlib's internal LaTeX parser and layout engine. For true LaTeX
rendering, see the text.usetex option.
"""
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot([1, 2, 3], label=r'$\sqrt{x^2}$')
ax.legend()
ax.set_xlabel(r'$\Delta_i^j$', fontsize=20)
ax.set_ylabe... | stable__gallery__text_labels_and_annotations__mathtext_demo | 0 | figure_000.png | Mathtext — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/mathtext_demo.html#sphx-glr-download-gallery-text-labels-and-annotations-mathtext-demo-py | https://matplotlib.org/stable/_downloads/620a5968857fc04683697be2487f7d32/mathtext_demo.py | mathtext_demo.py | text_labels_and_annotations | ok | 1 | null | |
"""
========================
Mathematical expressions
========================
Selected features of Matplotlib's math rendering engine.
"""
import re
import subprocess
import sys
import matplotlib.pyplot as plt
# Selection of features following "Writing mathematical expressions" tutorial,
# with randomly picked exam... | stable__gallery__text_labels_and_annotations__mathtext_examples | 0 | figure_000.png | Mathematical expressions — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/mathtext_examples.html#sphx-glr-download-gallery-text-labels-and-annotations-mathtext-examples-py | https://matplotlib.org/stable/_downloads/23eac6456b32a7aa35c13776e6b555a4/mathtext_examples.py | mathtext_examples.py | text_labels_and_annotations | ok | 1 | null | |
"""
===============
Math fontfamily
===============
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.
If no parameter is set, the global value
:rc:`mathtext.fontset` will be used.
"""
import matplotlib.pyplot as ... | stable__gallery__text_labels_and_annotations__mathtext_fontfamily_example | 0 | figure_000.png | Math fontfamily — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/mathtext_fontfamily_example.html#sphx-glr-download-gallery-text-labels-and-annotations-mathtext-fontfamily-example-py | https://matplotlib.org/stable/_downloads/b2cb9eb5412482e7116e4d49ed1a77b7/mathtext_fontfamily_example.py | mathtext_fontfamily_example.py | text_labels_and_annotations | ok | 1 | null | |
"""
=========
Multiline
=========
"""
import matplotlib.pyplot as plt
import numpy as np
fig, (ax0, ax1) = plt.subplots(ncols=2, figsize=(7, 4))
ax0.set_aspect(1)
ax0.plot(np.arange(10))
ax0.set_xlabel('this is a xlabel\n(with newlines!)')
ax0.set_ylabel('this is vertical\ntest', multialignment='center')
ax0.text(2,... | stable__gallery__text_labels_and_annotations__multiline | 0 | figure_000.png | Multiline — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/multiline.html#sphx-glr-download-gallery-text-labels-and-annotations-multiline-py | https://matplotlib.org/stable/_downloads/54f178535adde28359d49641be996dbf/multiline.py | multiline.py | text_labels_and_annotations | ok | 1 | null | |
"""
Placing text boxes
==================
When decorating Axes with text boxes, two useful tricks are to place the text
in axes coordinates (see :ref:`transforms_tutorial`),
so the text doesn'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
`~matp... | stable__gallery__text_labels_and_annotations__placing_text_boxes | 0 | figure_000.png | Placing text boxes — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/placing_text_boxes.html#sphx-glr-download-gallery-text-labels-and-annotations-placing-text-boxes-py | https://matplotlib.org/stable/_downloads/5791f26b231e858c2348b402b3931922/placing_text_boxes.py | placing_text_boxes.py | text_labels_and_annotations | ok | 1 | null | |
"""
==================================================
Concatenate text objects with different properties
==================================================
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 create... | stable__gallery__text_labels_and_annotations__rainbow_text | 0 | figure_000.png | Concatenate text objects with different properties — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/rainbow_text.html#sphx-glr-download-gallery-text-labels-and-annotations-rainbow-text-py | https://matplotlib.org/stable/_downloads/a5b6cfad5a914962a881f60a919c0ca7/rainbow_text.py | rainbow_text.py | text_labels_and_annotations | ok | 1 | null | |
"""
==========
STIX Fonts
==========
Demonstration of `STIX Fonts <https://www.stixfonts.org/>`_ used in LaTeX
rendering.
"""
import matplotlib.pyplot as plt
circle123 = "\N{CIRCLED DIGIT ONE}\N{CIRCLED DIGIT TWO}\N{CIRCLED DIGIT THREE}"
tests = [
r'$%s\;\mathrm{%s}\;\mathbf{%s}$' % ((circle123,) * 3),
r'$\... | stable__gallery__text_labels_and_annotations__stix_fonts_demo | 0 | figure_000.png | STIX Fonts — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/stix_fonts_demo.html#stix-fonts | https://matplotlib.org/stable/_downloads/23ab755716d61de16e37cb2c219347b1/stix_fonts_demo.py | stix_fonts_demo.py | text_labels_and_annotations | ok | 1 | null | |
import matplotlib.pyplot as plt
import numpy as np
y = [0.22, 0.34, 0.5, 0.56, 0.78]
x = [0.17, 0.5, 0.855]
X, Y = np.meshgrid(x, y)
fig, ax = plt.subplots(figsize=(6, 4), dpi=100)
ax.set(xlim=(0, 1), ylim=(0, 1), xticks=[], yticks=[])
ax.spines[:].set_visible(False)
ax.text(0.5, 0.5, 'plot', fontsize=128, ha='center... | stable__gallery__text_labels_and_annotations__text_alignment | 0 | figure_000.png | Text alignment — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/text_alignment.html#text-alignment | https://matplotlib.org/stable/_downloads/34b57850619635be59d7cd6efce83636/text_alignment-1.py | text_alignment-1.py | text_labels_and_annotations | ok | 1 | null | |
"""
===============
Text properties
===============
Plotting text of many different kinds.
.. redirect-from:: /gallery/pyplots/text_commands
"""
import matplotlib.pyplot as plt
fig = plt.figure()
fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold')
ax = fig.add_subplot()
fig.subplots_adjust(top=0.8... | stable__gallery__text_labels_and_annotations__text_commands | 0 | figure_000.png | Text properties — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/text_commands.html#text-properties | https://matplotlib.org/stable/_downloads/467b5b3581cf7c3e6fe735585466276d/text_commands.py | text_commands.py | text_labels_and_annotations | ok | 1 | null | |
"""
=======================================================
Controlling style of text and labels using a dictionary
=======================================================
This example shows how to share parameters across many text objects and labels
by creating a dictionary of options passed across several functions.... | stable__gallery__text_labels_and_annotations__text_fontdict | 0 | figure_000.png | Controlling style of text and labels using a dictionary — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/text_fontdict.html#sphx-glr-download-gallery-text-labels-and-annotations-text-fontdict-py | https://matplotlib.org/stable/_downloads/26217c4473de44985babfe2e37d1d431/text_fontdict.py | text_fontdict.py | text_labels_and_annotations | ok | 1 | null | |
"""
=======================================
Text rotation angle in data coordinates
=======================================
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 matte... | stable__gallery__text_labels_and_annotations__text_rotation_relative_to_line | 0 | figure_000.png | Text rotation angle in data coordinates — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/text_rotation_relative_to_line.html#text-rotation-angle-in-data-coordinates | https://matplotlib.org/stable/_downloads/ee1cbb890f9e69dbce9cce81e064a375/text_rotation_relative_to_line.py | text_rotation_relative_to_line.py | text_labels_and_annotations | ok | 1 | null | |
"""
=================
Title positioning
=================
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.
"""
import matplotlib.pyplot as plt
plt.plot(range(10))
plt.title('Center Title')
plt.title('Left Title', loc='left')
plt.... | stable__gallery__text_labels_and_annotations__titles_demo | 0 | figure_000.png | Title positioning — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/titles_demo.html#title-positioning | https://matplotlib.org/stable/_downloads/3f6f83882b13d7594b12c5868530ce0f/titles_demo.py | titles_demo.py | text_labels_and_annotations | ok | 3 | null | |
"""
=============
Unicode minus
=============
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 :rc:`axes.unicode_minus`.
__ https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
The replace... | stable__gallery__text_labels_and_annotations__unicode_minus | 0 | figure_000.png | Unicode minus — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/unicode_minus.html#unicode-minus | https://matplotlib.org/stable/_downloads/50ebbb8a676599f84ab33e447f10241d/unicode_minus.py | unicode_minus.py | text_labels_and_annotations | ok | 1 | null | |
"""
====================
Usetex text baseline
====================
Comparison of text baselines computed for mathtext and usetex.
"""
import matplotlib.pyplot as plt
plt.rcParams.update({"mathtext.fontset": "cm", "mathtext.rm": "serif"})
axs = plt.figure(figsize=(2 * 3, 6.5)).subplots(1, 2)
for ax, usetex in zip(axs... | stable__gallery__text_labels_and_annotations__usetex_baseline_test | 0 | figure_000.png | Usetex text baseline — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/usetex_baseline_test.html#usetex-text-baseline | https://matplotlib.org/stable/_downloads/f7473146da331478160ed3d1f7355e2f/usetex_baseline_test.py | usetex_baseline_test.py | text_labels_and_annotations | ok | 1 | null | |
"""
====================
Usetex text baseline
====================
Comparison of text baselines computed for mathtext and usetex.
"""
import matplotlib.pyplot as plt
plt.rcParams.update({"mathtext.fontset": "cm", "mathtext.rm": "serif"})
axs = plt.figure(figsize=(2 * 3, 6.5)).subplots(1, 2)
for ax, usetex in zip(axs... | stable__gallery__text_labels_and_annotations__usetex_baseline_test | 1 | figure_partial_000.png | Usetex text baseline — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/usetex_baseline_test.html#usetex-text-baseline | https://matplotlib.org/stable/_downloads/f7473146da331478160ed3d1f7355e2f/usetex_baseline_test.py | usetex_baseline_test.py | text_labels_and_annotations | ok | 1 | null | |
"""
===================
Usetex font effects
===================
This script demonstrates that font effects specified in your pdftex.map
are now supported in usetex mode.
"""
import matplotlib.pyplot as plt
def setfont(font):
return rf'\font\a {font} at 14pt\a '
fig = plt.figure()
for y, font, text in zip(
... | stable__gallery__text_labels_and_annotations__usetex_fonteffects | 0 | figure_000.png | Usetex font effects — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/usetex_fonteffects.html#usetex-font-effects | https://matplotlib.org/stable/_downloads/163cd5cb6f89537551c83a99889e2adc/usetex_fonteffects.py | usetex_fonteffects.py | text_labels_and_annotations | ok | 1 | null | |
"""
==============
Text watermark
==============
A watermark effect can be achieved by drawing a semi-transparent text.
"""
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
fig, ax = plt.subplots()
ax.plot(np.random.rand(20), '-o', ms=20, lw=2, al... | stable__gallery__text_labels_and_annotations__watermark_text | 0 | figure_000.png | Text watermark — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/text_labels_and_annotations/watermark_text.html#text-watermark | https://matplotlib.org/stable/_downloads/5882cc2b4c058b7b6cc23d60a0e9ba43/watermark_text.py | watermark_text.py | text_labels_and_annotations | ok | 1 | null | |
"""
=================
Align tick labels
=================
By default, tick labels are aligned towards the axis. This means the set of
*y* tick labels appear right-aligned. Because the alignment reference point
is on the axis, left-aligned tick labels would overlap the plotting area.
To achieve a good-looking left-alig... | stable__gallery__ticks__align_ticklabels | 0 | figure_000.png | Align tick labels — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/align_ticklabels.html#sphx-glr-download-gallery-ticks-align-ticklabels-py | https://matplotlib.org/stable/_downloads/d31c07322a206256b72ec6129b723e47/align_ticklabels.py | align_ticklabels.py | ticks | ok | 1 | null | |
"""
====================================
Automatically setting tick positions
====================================
Setting the behavior of tick auto-placement.
By default, Matplotlib will choose the number of ticks and tick positions so
that there is a reasonable number of ticks on the axis and they are located
at "r... | stable__gallery__ticks__auto_ticks | 0 | figure_000.png | Automatically setting tick positions — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/auto_ticks.html#sphx-glr-download-gallery-ticks-auto-ticks-py | https://matplotlib.org/stable/_downloads/85a17d6393e96ba8c675faf5d687e9cc/auto_ticks.py | auto_ticks.py | ticks | ok | 3 | null | |
"""
===========================
Center labels between ticks
===========================
Ticklabels are aligned relative to their associated tick. The alignment
'center', 'left', or 'right' can be controlled using the horizontal alignment
property::
for label in ax.get_xticklabels():
label.set_horizontalal... | stable__gallery__ticks__centered_ticklabels | 0 | figure_000.png | Center labels between ticks — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/centered_ticklabels.html#sphx-glr-download-gallery-ticks-centered-ticklabels-py | https://matplotlib.org/stable/_downloads/09364d81fc1cbd08346bd216bcc75656/centered_ticklabels.py | centered_ticklabels.py | ticks | ok | 1 | null | |
"""
=======================
Colorbar Tick Labelling
=======================
Vertical colorbars have ticks, tick labels, and labels visible on the *y* axis,
horizontal colorbars on the *x* axis. The ``ticks`` parameter can be used to
set the ticks and the ``format`` parameter can be used to format the tick labels
of th... | stable__gallery__ticks__colorbar_tick_labelling_demo | 0 | figure_000.png | Colorbar Tick Labelling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/colorbar_tick_labelling_demo.html#sphx-glr-download-gallery-ticks-colorbar-tick-labelling-demo-py | https://matplotlib.org/stable/_downloads/7c1c0355d383ada156a40adab206a88a/colorbar_tick_labelling_demo.py | colorbar_tick_labelling_demo.py | ticks | ok | 2 | null | |
"""
=======================
Colorbar Tick Labelling
=======================
Vertical colorbars have ticks, tick labels, and labels visible on the *y* axis,
horizontal colorbars on the *x* axis. The ``ticks`` parameter can be used to
set the ticks and the ``format`` parameter can be used to format the tick labels
of th... | stable__gallery__ticks__colorbar_tick_labelling_demo | 1 | figure_001.png | Colorbar Tick Labelling — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/colorbar_tick_labelling_demo.html#sphx-glr-download-gallery-ticks-colorbar-tick-labelling-demo-py | https://matplotlib.org/stable/_downloads/7c1c0355d383ada156a40adab206a88a/colorbar_tick_labelling_demo.py | colorbar_tick_labelling_demo.py | ticks | ok | 2 | null | |
"""
=============
Custom Ticker
=============
The :mod:`matplotlib.ticker` module defines many preset tickers, but was
primarily designed for extensibility, i.e., to support user customized ticking.
In this example, a user defined function is used to format the ticks in
millions of dollars on the y-axis.
"""
import ... | stable__gallery__ticks__custom_ticker1 | 0 | figure_000.png | Custom Ticker — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/custom_ticker1.html#sphx-glr-download-gallery-ticks-custom-ticker1-py | https://matplotlib.org/stable/_downloads/d36b5eca27b65f4b6ca111c0b67edbdf/custom_ticker1.py | custom_ticker1.py | ticks | ok | 1 | null | |
"""
.. _date_concise_formatter:
============================================
Format date ticks using ConciseDateFormatter
============================================
Finding good tick values and formatting the ticks for an axis that
has date data is often a challenge. `~.dates.ConciseDateFormatter` is
meant to impr... | stable__gallery__ticks__date_concise_formatter | 0 | figure_000.png | Format date ticks using ConciseDateFormatter — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_concise_formatter.html#sphx-glr-download-gallery-ticks-date-concise-formatter-py | https://matplotlib.org/stable/_downloads/3786188bae617f8a5f8d7443decb1417/date_concise_formatter.py | date_concise_formatter.py | ticks | ok | 5 | null | |
"""
=================
Date Demo Convert
=================
"""
import datetime
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.dates import DateFormatter, DayLocator, HourLocator, drange
date1 = datetime.datetime(2000, 3, 2)
date2 = datetime.datetime(2000, 3, 6)
delta = datetime.timedelta(hours=6)... | stable__gallery__ticks__date_demo_convert | 0 | figure_000.png | Date Demo Convert — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_demo_convert.html#sphx-glr-download-gallery-ticks-date-demo-convert-py | https://matplotlib.org/stable/_downloads/ac73ab64c576ed49d53ad046d22c6af7/date_demo_convert.py | date_demo_convert.py | ticks | ok | 1 | null | |
"""
=========================================
Placing date ticks using recurrence rules
=========================================
The `iCalender RFC`_ specifies *recurrence rules* (rrules), that define
date sequences. You can use rrules in Matplotlib to place date ticks.
This example sets custom date ticks on every 5... | stable__gallery__ticks__date_demo_rrule | 0 | figure_000.png | Placing date ticks using recurrence rules — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_demo_rrule.html#sphx-glr-download-gallery-ticks-date-demo-rrule-py | https://matplotlib.org/stable/_downloads/8b32dac4f3661c0ab58c25458083690a/date_demo_rrule.py | date_demo_rrule.py | ticks | ok | 1 | null | |
"""
.. _date_formatters_locators:
=================================
Date tick locators and formatters
=================================
This example illustrates the usage and effect of the various date locators and
formatters.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.dates import (FR, ... | stable__gallery__ticks__date_formatters_locators | 0 | figure_000.png | Date tick locators and formatters — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_formatters_locators.html#sphx-glr-download-gallery-ticks-date-formatters-locators-py | https://matplotlib.org/stable/_downloads/ab99798b19ac3141cfb6384315e229d8/date_formatters_locators.py | date_formatters_locators.py | ticks | ok | 2 | null | |
"""
.. _date_formatters_locators:
=================================
Date tick locators and formatters
=================================
This example illustrates the usage and effect of the various date locators and
formatters.
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.dates import (FR, ... | stable__gallery__ticks__date_formatters_locators | 1 | figure_001.png | Date tick locators and formatters — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_formatters_locators.html#sphx-glr-download-gallery-ticks-date-formatters-locators-py | https://matplotlib.org/stable/_downloads/ab99798b19ac3141cfb6384315e229d8/date_formatters_locators.py | date_formatters_locators.py | ticks | ok | 2 | null | |
"""
=====================================
Custom tick formatter for time series
=====================================
.. redirect-from:: /gallery/text_labels_and_annotations/date_index_formatter
.. redirect-from:: /gallery/ticks/date_index_formatter2
When plotting daily data, e.g., financial time series, one often wa... | stable__gallery__ticks__date_index_formatter | 0 | figure_000.png | Custom tick formatter for time series — Matplotlib 3.10.8 documentation | https://matplotlib.org/stable/gallery/ticks/date_index_formatter.html#sphx-glr-download-gallery-ticks-date-index-formatter-py | https://matplotlib.org/stable/_downloads/8bed961b9fa5a0bf5184a42332b13e0a/date_index_formatter.py | date_index_formatter.py | ticks | ok | 1 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.