Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd7493a

Browse filesBrowse files
resurrect axes_grid1 doc
1 parent 304154c commit dd7493a
Copy full SHA for dd7493a

File tree

Expand file treeCollapse file tree

19 files changed

+118
-53
lines changed
Filter options
Expand file treeCollapse file tree

19 files changed

+118
-53
lines changed

‎doc/api/api_changes.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Changed function signatures
6262
kwarg ``fig`` to `.GridSpec.get_subplot_params` is
6363
deprecated, use ``figure`` instead.
6464

65-
Using `.pyplot.axes` with an `.Axes` as argument is deprecated. This sets
65+
Using `.pyplot.axes` with an `~matplotlib.axes.Axes` as argument is deprecated. This sets
6666
the current axes, i.e. it has the same effect as `.pyplot.sca`. For clarity
6767
``plt.sca(ax)`` should be preferred over ``plt.axes(ax)``.
6868

@@ -848,7 +848,7 @@ Deprecation and removal
848848

849849
Color of Axes
850850
~~~~~~~~~~~~~
851-
The ``axisbg`` and ``axis_bgcolor`` properties on ``Axes`` have been
851+
The ``axisbg`` and ``axis_bgcolor`` properties on *Axes* have been
852852
deprecated in favor of ``facecolor``.
853853

854854
GTK and GDK backends deprecated
@@ -1281,8 +1281,8 @@ algorithm that was not necessarily applicable to custom Axes. Three new private
12811281
methods, :meth:`~matplotlib.axes._base._AxesBase._get_view`,
12821282
:meth:`~matplotlib.axes._base._AxesBase._set_view`, and
12831283
:meth:`~matplotlib.axes._base._AxesBase._set_view_from_bbox`, allow for custom
1284-
``Axes`` classes to override the pan and zoom algorithms. Implementors of
1285-
custom ``Axes`` who override these methods may provide suitable behaviour for
1284+
*Axes* classes to override the pan and zoom algorithms. Implementors of
1285+
custom *Axes* who override these methods may provide suitable behaviour for
12861286
both pan and zoom as well as the view navigation buttons on the interactive
12871287
toolbars.
12881288

‎doc/api/toolkits/axes_grid.rst

Copy file name to clipboardExpand all lines: doc/api/toolkits/axes_grid.rst
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The Matplotlib axes_grid Toolkit API
1010
.. currentmodule:: mpl_toolkits
1111

1212
Axes Grid
13-
---------
13+
=========
1414
.. note::
1515

1616
There is an older version of the AxesGrid toolkit, ``axes_grid`` (instead of
@@ -20,9 +20,8 @@ Axes Grid
2020
see the `previous version of the docs
2121
<https://matplotlib.org/2.0.1/mpl_toolkits/axes_grid/index.html#toolkit-axesgrid-index>`_.
2222

23-
.. autosummary::
24-
:toctree: ../_as_gen
25-
:template: automodule.rst
2623

27-
axes_grid1
28-
axisartist
24+
25+
:ref:`toolkit_axisartist-index`
26+
27+
:ref:`toolkit_axesgrid1-index`

‎doc/mpl_toolkits/axes_grid1/index.rst renamed to ‎doc/api/toolkits/axes_grid1.rst

Copy file name to clipboardExpand all lines: doc/api/toolkits/axes_grid1.rst
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,27 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
2222
has divided into two separate namespace (*axes_grid1* and *axisartist*).
2323
While *axes_grid* namespace is maintained for the backward compatibility,
2424
use of *axes_grid1* and *axisartist* is recommended.
25+
26+
27+
.. currentmodule:: mpl_toolkits
28+
29+
.. _toolkit-axes-grid1-api:
30+
31+
:mod:`mpl_toolkits.axes_grid1`
32+
===================================
33+
34+
.. autosummary::
35+
:toctree: ../_as_gen
36+
:template: automodule.rst
37+
38+
axes_grid1.anchored_artists
39+
axes_grid1.axes_divider
40+
axes_grid1.axes_grid
41+
axes_grid1.axes_rgb
42+
axes_grid1.axes_size
43+
axes_grid1.colorbar
44+
axes_grid1.inset_locator
45+
axes_grid1.mpl_axes
46+
axes_grid1.parasite_axes
47+
48+

‎doc/mpl_toolkits/axisartist/index.rst renamed to ‎doc/api/toolkits/axisartist.rst

Copy file name to clipboardExpand all lines: doc/api/toolkits/axisartist.rst
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,29 @@ mpl's Axis class. This change was strongly motivated to support curvilinear grid
1111

1212
You can find a tutorial describing usage of axisartist at
1313
:ref:`axisartist_users-guide-index`.
14+
15+
16+
.. currentmodule:: mpl_toolkits
17+
18+
.. _toolkit-axisartist-api:
19+
20+
:mod:`mpl_toolkits.axisartist`
21+
===================================
22+
23+
.. autosummary::
24+
:toctree: ../_as_gen
25+
:template: automodule.rst
26+
27+
axisartist.angle_helper
28+
axisartist.axes_divider
29+
axisartist.axes_grid
30+
axisartist.axes_rgb
31+
axisartist.axis_artist
32+
axisartist.axisline_style
33+
axisartist.axislines
34+
axisartist.clip_path
35+
axisartist.floating_axes
36+
axisartist.grid_finder
37+
axisartist.grid_helper_curvelinear
38+
axisartist.parasite_axes
39+

‎doc/mpl_toolkits/index.rst renamed to ‎doc/api/toolkits/index.rst

Copy file name to clipboardExpand all lines: doc/api/toolkits/index.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ lighter weight solution for some use cases. Check out the
2424
:ref:`mplot3d tutorial <sphx_glr_tutorials_toolkits_mplot3d.py>` for more
2525
information.
2626

27-
.. figure:: ../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png
28-
:target: ../gallery/mplot3d/contourf3d_2.html
27+
.. figure:: ../../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png
28+
:target: ../../gallery/mplot3d/contourf3d_2.html
2929
:align: center
3030
:scale: 50
3131

@@ -54,7 +54,7 @@ collection of helper classes for displaying multiple axes in Matplotlib.
5454
.. toctree::
5555
:maxdepth: 2
5656

57-
axes_grid1/index.rst
57+
axes_grid1.rst
5858

5959

6060
.. _toolkit_axisartist:
@@ -68,7 +68,7 @@ a custom Axes class that is meant to support curvilinear grids.
6868
.. toctree::
6969
:maxdepth: 2
7070

71-
axisartist/index.rst
71+
axisartist.rst
7272

7373

7474
API
File renamed without changes.

‎doc/mpl_toolkits/mplot3d/index.rst renamed to ‎doc/api/toolkits/mplot3d/index.rst

Copy file name to clipboardExpand all lines: doc/api/toolkits/mplot3d/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The resulting graph will have the same look and feel as regular 2D plots.
1414
See the :ref:`mplot3d tutorial <sphx_glr_tutorials_toolkits_mplot3d.py>` for
1515
more information on how to use this toolkit.
1616

17-
.. image:: ../../_static/demo_mplot3d.png
17+
.. image:: /_static/demo_mplot3d.png
1818

1919
The interactive backends also provide the ability to rotate and zoom
2020
the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging

‎doc/contents.rst

Copy file name to clipboardExpand all lines: doc/contents.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Overview
1616

1717
users/index.rst
1818
faq/index.rst
19-
mpl_toolkits/index.rst
19+
api/toolkits/index.rst
2020
resources/index.rst
2121
thirdpartypackages/index.rst
2222
api/index.rst

‎doc/index.rst

Copy file name to clipboardExpand all lines: doc/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ require changes to your existing code is logged in the :doc:`API changes
142142
Toolkits
143143
========
144144

145-
Matplotlib ships with several add-on :doc:`toolkits <mpl_toolkits/index>`,
145+
Matplotlib ships with several add-on :doc:`toolkits <api/toolkits/index>`,
146146
including 3d plotting with `mplot3d`, axes helpers in `axes_grid1` and axis
147147
helpers in `axisartist`.
148148

‎doc/make.bat

Copy file name to clipboardExpand all lines: doc/make.bat
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if "%SPHINXBUILD%" == "" (
1010
set SOURCEDIR=.
1111
set BUILDDIR=build
1212
set SPHINXPROJ=matplotlib
13-
set SPHINXOPTS=-W
13+
set SPHINXOPTS=
1414
set O=
1515

1616
%SPHINXBUILD% >NUL 2>NUL

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+11-6Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ def _stale_figure_callback(self, val):
5858

5959
class AxesStack(Stack):
6060
"""
61-
Specialization of the `.Stack` to handle all tracking of `.Axes` in a
62-
`.Figure`. This stack stores ``key, (ind, axes)`` pairs, where:
61+
Specialization of the `.Stack` to handle all tracking of
62+
`~matplotlib.axes.Axes` in a `.Figure`.
63+
This stack stores ``key, (ind, axes)`` pairs, where:
6364
6465
* **key** should be a hash of the args and kwargs
6566
used in generating the Axes.
@@ -994,7 +995,8 @@ def set_frameon(self, b):
994995

995996
def delaxes(self, ax):
996997
"""
997-
Remove the `.Axes` *ax* from the figure and update the current axes.
998+
Remove the `~matplotlib.axes.Axes` *ax* from the figure and update the
999+
current axes.
9981000
"""
9991001
self._axstack.remove(ax)
10001002
for func in self._axobservers:
@@ -2114,7 +2116,8 @@ def align_xlabels(self, axs=None):
21142116
Parameters
21152117
----------
21162118
axs : list of `~matplotlib.axes.Axes`
2117-
Optional list of (or ndarray) `.Axes` to align the xlabels.
2119+
Optional list of (or ndarray) `~matplotlib.axes.Axes`
2120+
to align the xlabels.
21182121
Default is to align all axes on the figure.
21192122
21202123
See Also
@@ -2182,7 +2185,8 @@ def align_ylabels(self, axs=None):
21822185
Parameters
21832186
----------
21842187
axs : list of `~matplotlib.axes.Axes`
2185-
Optional list (or ndarray) of `.Axes` to align the ylabels.
2188+
Optional list (or ndarray) of `~matplotlib.axes.Axes`
2189+
to align the ylabels.
21862190
Default is to align all axes on the figure.
21872191
21882192
See Also
@@ -2245,7 +2249,8 @@ def align_labels(self, axs=None):
22452249
Parameters
22462250
----------
22472251
axs : list of `~matplotlib.axes.Axes`
2248-
Optional list (or ndarray) of `.Axes` to align the labels.
2252+
Optional list (or ndarray) of `~matplotlib.axes.Axes`
2253+
to align the labels.
22492254
Default is to align all axes on the figure.
22502255
22512256
See Also

‎lib/matplotlib/legend.py

Copy file name to clipboardExpand all lines: lib/matplotlib/legend.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def __init__(self, parent, handles, labels,
346346
"""
347347
Parameters
348348
----------
349-
parent : `.Axes` or `.Figure`
349+
parent : `~matplotlib.axes.Axes` or `.Figure`
350350
The artist that contains the legend.
351351
352352
handles : sequence of `.Artist`

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,9 @@ def axes(arg=None, **kwargs):
782782
- 4-tuple of floats *rect* = ``[left, bottom, width, height]``.
783783
A new axes is added with dimensions *rect* in normalized
784784
(0, 1) units using `~.Figure.add_axes` on the current figure.
785-
- `.Axes`: This is equivalent to `.pyplot.sca`. It sets the current
786-
axes to *arg*. Note: This implicitly changes the current figure to
787-
the parent of *arg*.
785+
- `~matplotlib.axes.Axes`: This is equivalent to `.pyplot.sca`.
786+
It sets the current axes to *arg*. Note: This implicitly
787+
changes the current figure to the parent of *arg*.
788788
789789
.. note:: The use of an Axes as an argument is deprecated and will be
790790
removed in v3.0. Please use `.pyplot.sca` instead.
@@ -898,16 +898,16 @@ def subplot(*args, **kwargs):
898898
899899
subplot(nrows, ncols, index, **kwargs)
900900
901-
In the current figure, create and return an `.Axes`, at position *index*
902-
of a (virtual) grid of *nrows* by *ncols* axes. Indexes go from 1 to
903-
``nrows * ncols``, incrementing in row-major order.
901+
In the current figure, create and return an `~matplotlib.axes.Axes`,
902+
at position *index* of a (virtual) grid of *nrows* by *ncols* axes.
903+
Indexes go from 1 to ``nrows * ncols``, incrementing in row-major order.
904904
905905
If *nrows*, *ncols* and *index* are all less than 10, they can also be
906906
given as a single, concatenated, three-digit number.
907907
908908
For example, ``subplot(2, 3, 3)`` and ``subplot(233)`` both create an
909-
`.Axes` at the top right corner of the current figure, occupying half of
910-
the figure height and a third of the figure width.
909+
`matplotlib.axes.Axes` at the top right corner of the current figure,
910+
occupying half of the figure height and a third of the figure width.
911911
912912
.. note::
913913

‎lib/mpl_toolkits/axes_grid1/colorbar.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/colorbar.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
'''
1+
"""
2+
================
3+
Colorbar toolkit
4+
================
5+
26
Colorbar toolkit with two classes and a function:
37
48
:class:`ColorbarBase`
@@ -17,7 +21,8 @@
1721
and :class:`Colorbar`; the :func:`~matplotlib.pyplot.colorbar` function
1822
is a thin wrapper over :meth:`~matplotlib.figure.Figure.colorbar`.
1923
20-
'''
24+
"""
25+
2126
from __future__ import (absolute_import, division, print_function,
2227
unicode_literals)
2328

‎lib/mpl_toolkits/axisartist/axis_artist.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/axis_artist.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
The text angles are actually relative to (90 + angle of the direction
6060
to the ticklabel), which gives 0 for bottom axis.
6161
62-
left bottom right top
62+
Parameter left bottom right top
6363
ticklabels location left right right left
6464
axislabel location left right right left
6565
ticklabels angle 90 0 -90 180
@@ -83,6 +83,7 @@
8383
* AxisLabel : pad
8484
8585
"""
86+
8687
from __future__ import (absolute_import, division, print_function,
8788
unicode_literals)
8889

‎lib/mpl_toolkits/axisartist/floating_axes.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/floating_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __init__(self, aux_trans, extremes,
236236
objects which defines the transform and its inverse. The callables
237237
need take two arguments of array of source coordinates and
238238
should return two target coordinates:
239-
e.g., x2, y2 = trans(x1, y1)
239+
e.g., *x2, y2 = trans(x1, y1)*
240240
"""
241241

242242
self._old_values = None

‎tutorials/advanced/transforms_tutorial.py

Copy file name to clipboardExpand all lines: tutorials/advanced/transforms_tutorial.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
| | |controlled by xlim and ylim. |
2626
+-----------+-----------------------------+-----------------------------------+
2727
|"axes" |``ax.transAxes`` |The coordinate system of the |
28-
| | |`.Axes`; (0, 0) is bottom left of |
29-
| | |the axes, and (1, 1) is top right |
30-
| | |of the axes. |
28+
| | |`~matplotlib.axes.Axes`; (0, 0) |
29+
| | |is bottom left of the axes, and |
30+
| | |(1, 1) is top right of the axes. |
3131
+-----------+-----------------------------+-----------------------------------+
3232
|"figure" |``fig.transFigure`` |The coordinate system of the |
3333
| | |`.Figure`; (0, 0) is bottom left |

‎tutorials/intermediate/constrainedlayout_guide.py

Copy file name to clipboardExpand all lines: tutorials/intermediate/constrainedlayout_guide.py
+10-8Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,11 @@ def docomplicated(suptitle=None):
543543
# Each item has a layoutbox associated with it. The nesting of gridspecs
544544
# created with `.GridSpecFromSubplotSpec` can be arbitrarily deep.
545545
#
546-
# Each `.Axes` has *two* layoutboxes. The first one ``ax._layoutbox``
547-
# represents the outside of the Axes and all its decorations (i.e. ticklabels,
548-
# axis labels, etc.). The second layoutbox corresponds to the Axes'
549-
# `ax.position`, which sets where in the figure the spines are placed.
546+
# Each ``~matplotlib.axes.Axes` has *two* layoutboxes. The first one,
547+
# ``ax._layoutbox`` represents the outside of the Axes and all its
548+
# decorations (i.e. ticklabels,axis labels, etc.).
549+
# The second layoutbox corresponds to the Axes' `ax.position`, which sets
550+
# where in the figure the spines are placed.
550551
#
551552
# Why so many stacked containers? Ideally, all that would be needed are the
552553
# Axes layout boxes. For the Gridspec case, a container is
@@ -625,10 +626,11 @@ def docomplicated(suptitle=None):
625626
# constraint on their widths because their subplotspecs occupy the same
626627
# number of columns (one in this example).
627628
#
628-
# The colorbar layout logic is contained in `~.colorbar.make_axes` which
629-
# call `._constrained_layout.layoutcolorbarsingle` for cbars attached to
630-
# a single axes, and `._constrained_layout.layoutcolorbargridspec` if the
631-
# colorbar is associated wiht a gridspec.
629+
# The colorbar layout logic is contained in `~matplotlib.colorbar.make_axes`
630+
# which calls `._constrained_layout.layoutcolorbarsingle`
631+
# for cbars attached to a single axes, and
632+
# `._constrained_layout.layoutcolorbargridspec` if the colorbar is associated
633+
# with a gridspec.
632634

633635
fig, ax = plt.subplots(1, 2, constrained_layout=True)
634636
im = ax[0].pcolormesh(arr, **pc_kwargs)

‎tutorials/text/text_intro.py

Copy file name to clipboardExpand all lines: tutorials/text/text_intro.py
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@
3838
`.pyplot` API OO API description
3939
=================== =================== ======================================
4040
`~.pyplot.text` `~.Axes.text` Add text at an arbitrary location of
41-
the `.Axes`.
41+
the `~matplotlib.axes.Axes`.
4242
4343
`~.pyplot.annotate` `~.Axes.annotate` Add an annotation, with an optional
4444
arrow, at an arbitrary location of the
45-
`.Axes`.
45+
`~matplotlib.axes.Axes`.
4646
47-
`~.pyplot.xlabel` `~.Axes.set_xlabel` Add a label to the `.Axes`\\'s x-axis.
47+
`~.pyplot.xlabel` `~.Axes.set_xlabel` Add a label to the
48+
`~matplotlib.axes.Axes`\\'s x-axis.
4849
49-
`~.pyplot.ylabel` `~.Axes.set_ylabel` Add a label to the `.Axes`\\'s y-axis.
50+
`~.pyplot.ylabel` `~.Axes.set_ylabel` Add a label to the
51+
`~matplotlib.axes.Axes`\\'s y-axis.
5052
51-
`~.pyplot.title` `~.Axes.set_title` Add a title to the `.Axes`.
53+
`~.pyplot.title` `~.Axes.set_title` Add a title to the
54+
`~matplotlib.axes.Axes`.
5255
5356
`~.pyplot.figtext` `~.Figure.text` Add text at an arbitrary location of
5457
the `.Figure`.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.