From daa24b0b94945127e34f9204369322f119be11ab Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Tue, 21 Jun 2022 09:58:07 +0200 Subject: [PATCH] DOC: improve spines crosslinking [skip-actions] [skip-azure] [skip-appveyor] --- examples/spines/spines.py | 12 ++++++++++++ lib/matplotlib/spines.py | 1 + 2 files changed, 13 insertions(+) diff --git a/examples/spines/spines.py b/examples/spines/spines.py index eff641c32325..d21947d33636 100644 --- a/examples/spines/spines.py +++ b/examples/spines/spines.py @@ -8,6 +8,9 @@ - normal Axes, with spines on all four sides; - an Axes with spines only on the left and bottom; - an Axes using custom bounds to limit the extent of the spine. + +Each `.axes.Axes` has a list of `.Spine` objects, accessible +via the container ``ax.spines``. """ import numpy as np import matplotlib.pyplot as plt @@ -44,3 +47,12 @@ ax2.xaxis.set_ticks_position('bottom') plt.show() + +# .. admonition:: References +# +# The use of the following functions, methods, classes and modules is shown +# in this example: +# +# - `matplotlib.Spines.set_visible` +# - `matplotlib.Spines.set_bounds` +# - `matplotlib.axis.set_ticks_position` diff --git a/lib/matplotlib/spines.py b/lib/matplotlib/spines.py index 14216e10c255..1f373fb177ba 100644 --- a/lib/matplotlib/spines.py +++ b/lib/matplotlib/spines.py @@ -27,6 +27,7 @@ class Spine(mpatches.Patch): `~.Spine.set_patch_line`, `~.Spine.set_patch_circle`, or `~.Spine.set_patch_arc` has been called. Line-like is the default. + For examples see :ref:`spines_examples`. """ def __str__(self): return "Spine"