8000 Fix links · matplotlib/matplotlib@9f2a3c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f2a3c3

Browse files
committed
Fix links
1 parent 74ff1bb commit 9f2a3c3

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

galleries/users_explain/artists/artist_intro.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ Introduction to Artists
55

66
Almost all objects you interact with on a Matplotlib plot are called "Artist"
77
(and are subclasses of the `.Artist` class). :doc:`Figure <../figure/index>`
8-
and :doc:`Axes <../axes/index>` are Artists, and generally contain :doc:`Axis
9-
<../axis/index>` Artists and Artists that contain data or annotation
10-
information.
8+
and :doc:`Axes <../axes/index>` are Artists, and generally contain
9+
`~.axis.Axis` Artists and Artists that contain data or annotation information.
1110

1211

1312
Creating Artists

galleries/users_explain/artists/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ Artists
44

55
Almost all objects you interact with on a Matplotlib plot are called "Artist"
66
(and are subclasses of the `.Artist` class). :doc:`Figure <../figure/index>`
7-
and :doc:`Axes <../axes/index>` are Artists, and generally contain :doc:`Axis
8-
<../axis/index>` Artists and Artists that contain data or annotation
9-
information.
7+
and :doc:`Axes <../axes/index>` are Artists, and generally contain
8+
`~.axis.Axis` Artists and Artists that contain data or annotation information.
109

1110
.. toctree::
1211
:maxdepth: 2

galleries/users_explain/axes/axes_intro.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Introduction to Axes (or Subplots)
55

66
Matplotlib `~.axes.Axes` are the gateway to creating your data visualizations.
77
Once an Axes is placed on a figure there are many methods that can be used to
8-
add data to the Axes. An Axes typically has a pair of :doc:`Axis <../axis/index>`
8+
add data to the Axes. An Axes typically has a pair of `~.axis.Axis`
99
Artists that define the data coordinate system, and include methods to add
1010
annotations like x- and y-labels, titles, and legends.
1111

@@ -130,7 +130,7 @@ Note that text can also be added to axes using `~.axes.Axes.text`, and `~.axes.A
130130
Axes limits, scales, and ticking
131131
--------------------------------
132132

133-
Each Axes has two (or more) `~.axis.Axis` objects, that can be accessed via :attr:`~matplotlib.axes.Axes.xaxis` and :attr:`~matplotlib.axes.Axes.yaxis` properties. These have substantial number of methods on them, and for highly customizable Axis-es it is useful to read more about that API (:doc:`../axis/index`). However, the Axes class offers a number of helpers for the most common of these methods. Indeed, the `~.axes.Axes.set_xlabel`, discussed above, is a helper for the `~.Axis.set_label_text`.
133+
Each Axes has two (or more) `~.axis.Axis` objects, that can be accessed via :attr:`~matplotlib.axes.Axes.xaxis` and :attr:`~matplotlib.axes.Axes.yaxis` properties. These have substantial number of methods on them, and for highly customizable Axis-es it is useful to read the API at `~.axis.Axis`. However, the Axes class offers a number of helpers for the most common of these methods. Indeed, the `~.axes.Axes.set_xlabel`, discussed above, is a helper for the `~.Axis.set_label_text`.
134134

135135
Other important methods set the extent on the axes (`~.axes.Axes.set_xlim`, `~.axes.Axes.set_ylim`), or more fundamentally the scale of the axes. So for instance, we can make an Axis have a logarithmic scale, and zoom in on a sub-portion of the data:
136136

@@ -158,7 +158,7 @@ Many aspects of Axes ticks and tick labeling can be adjusted using `~.axes.Axes.
158158
labelcolor='green')
159159

160160

161-
More fine-grained control on ticks, setting scales, and controlling the Axis can be highly customized beyond these Axes-level helpers. An introduction to these methods can be found in :ref:`users_axis`, or the API reference for `.axis.Axis`.
161+
More fine-grained control on ticks, setting scales, and controlling the Axis can be highly customized beyond these Axes-level helpers.
162162

163163
Axes layout
164164
-----------

galleries/users_explain/axes/scales.py renamed to galleries/users_explain/axes/axes_scales.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
# =====================
9090
#
9191
# There are other scales that can be used. The list of registered
92-
# scales can be returned from `.scales.get_scale_names`:
92+
# scales can be returned from `.scale.get_scale_names`:
9393

9494
print(mscale.get_scale_names())
9595

@@ -122,7 +122,7 @@
122122
#
123123
# Some of the default scales have optional arguments. These are
124124
# documented in the API reference for the respective scales at
125-
# `~.matplotlib.scales`. One can change the base of the logarithm
125+
# `~.matplotlib.scale`. One can change the base of the logarithm
126126
# being plotted (eg 2 below) or the linear threshold range
127127
# for ``'symlog'``.
128128

@@ -183,9 +183,9 @@ def inverse(a):
183183
# ==================
184184
#
185185
# A scale is an object that gets attached to an axis. The class documentation
186-
# is at `~.scale`. `~.axes.Axes.set_xscale` and `~.axes.Axes.set_yscale` are
187-
# helper methods for `~.axis.Axis.set_scale`. You can also determine the scale
188-
# on an axis with:
186+
# is at `~matplotlib.scale`. `~.axes.Axes.set_xscale` and `~.axes.Axes.set_yscale`
187+
# set the scale on the respective Axis objects. You can determine the scale
188+
# on an axis with `~.axis.Axis.get_scale`:
189189

190190
fig, ax = plt.subplots(layout='constrained',
191191
figsize=(3.2, 3))

galleries/users_explain/axes/ticks.py renamed to galleries/users_explain/axes/axes_ticks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def fmt_two_digits(x, pos):
231231
# ===============================
232232
#
233233
# The appearance of ticks can be controlled at a low level by finding the
234-
# individual `~.ticker.Ticks` on the axis. However, usually it is simplest to
234+
# individual `~.axis.Tick` on the axis. However, usually it is simplest to
235235
# use `~.axes.Axes.tick_params` to change all the objects at once.
236236
#
237237
# The ``tick_params`` method can change the properties of ticks:

galleries/users_explain/axes/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Axes and subplots
44

55
Matplotlib `~.axes.Axes` are the gateway to creating your data visualizations.
66
Once an Axes is placed on a figure there are many methods that can be used to
7-
add data to the Axes. An Axes typically has a pair of :doc:`Axis <../axis/index>`
7+
add data to the Axes. An Axes typically has a pair of `~.axis.Axis`
88
Artists that define the data coordinate system, and include methods to add
99
annotations like x- and y-labels, titles, and legends.
1010

@@ -41,8 +41,8 @@ annotations like x- and y-labels, titles, and legends.
4141
:maxdepth: 2
4242
:includehidden:
4343

44-
scales
45-
ticks
44+
axes_scales
45+
axes_ticks
4646
Legends <legend_guide>
4747
Subplot mosaic <mosaic>
4848

lib/matplotlib/axis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ def set_label_coords(self, x, y, transform=None):
774774
self.stale = True
775775

776776
def get_transform(self):
777+
"""Return the transform used in the Axis' scale"""
777778
return self._scale.get_transform()
778779

779780
def get_scale(self):

0 commit comments

Comments
 (0)
0