Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit448ba7d

Browse files
authored
Merge pull request#11079 from ImportanceOfBeingErnest/resurrect-axesgrid1-doc
DOC: Resurrecting axes_grid1 documentation
2 parentsd6dcc71 +1a9729e commit448ba7d

File tree

25 files changed

+195
-141
lines changed

25 files changed

+195
-141
lines changed

‎doc/_templates/automodule.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{{ fullname | escape | underline}}
22

3+
{% if fullname in ['mpl_toolkits.axes_grid1.colorbar'] %}
4+
.. To prevent problems with the autosummary for the colorbar doc
5+
treat this separately (sphinx-doc/sphinx/issues/4874)
6+
..automodule::{{ fullname }}
7+
:members:
8+
9+
{% else %}
310

411
..automodule::{{ fullname }}
512
:no-members:
@@ -33,3 +40,4 @@ Functions
3340
{{ item }}{% endif %}{% endfor %}
3441
{% endif %}
3542
{% endblock %}
43+
{% endif %}

‎doc/_templates/autosummary.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
.. auto{{ objtype }}:: {{ objname }}
77
88
{% if objtype in ['class', 'method', 'function'] %}
9-
9+
{% if objname in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes',
10+
'ParasiteAxesAuxTrans', 'ParasiteAxes'] %}
11+
.. Filter out the above aliases to other classes, as sphinx gallery
12+
creates no example file for those (sphinx-gallery/sphinx-gallery#365)
13+
14+
{% else %}
1015
..include::{{module}}.{{objname}}.examples
1116

1217
..raw::html
1318

1419
<divclass="clearer"></div>
1520

21+
{% endif %}
1622
{% endif %}

‎doc/api/api_changes.rst

Lines 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

@@ -864,7 +864,7 @@ Deprecation and removal
864864

865865
Color of Axes
866866
~~~~~~~~~~~~~
867-
The ``axisbg`` and ``axis_bgcolor`` properties on``Axes`` have been
867+
The ``axisbg`` and ``axis_bgcolor`` properties on*Axes* have been
868868
deprecated in favor of ``facecolor``.
869869

870870
GTK and GDK backends deprecated
@@ -1297,8 +1297,8 @@ algorithm that was not necessarily applicable to custom Axes. Three new private
12971297
methods,:meth:`~matplotlib.axes._base._AxesBase._get_view`,
12981298
:meth:`~matplotlib.axes._base._AxesBase._set_view`, and
12991299
:meth:`~matplotlib.axes._base._AxesBase._set_view_from_bbox`, allow for custom
1300-
``Axes`` classes to override the pan and zoom algorithms. Implementors of
1301-
custom``Axes`` who override these methods may provide suitable behaviour for
1300+
*Axes* classes to override the pan and zoom algorithms. Implementors of
1301+
custom*Axes* who override these methods may provide suitable behaviour for
13021302
both pan and zoom as well as the view navigation buttons on the interactive
13031303
toolbars.
13041304

‎doc/api/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,8 @@ Toolkits
7474
..toctree::
7575
:maxdepth:1
7676

77-
toolkits/axes_grid.rst
77+
7878
toolkits/mplot3d.rst
79+
toolkits/axes_grid1.rst
80+
toolkits/axisartist.rst
81+
toolkits/axes_grid.rst

‎doc/api/toolkits/axes_grid.rst

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
.. _axes_grid-api-index:
22

3-
####################################
4-
The Matplotlib axes_grid Toolkit API
5-
####################################
6-
7-
:Release: |version|
8-
:Date: |today|
3+
Matplotlib axes_grid Toolkit
4+
============================
95

106
..currentmodule::mpl_toolkits
117

12-
Axes Grid
13-
---------
8+
149
..note::
15-
16-
There is an older version of the AxesGrid toolkit, ``axes_grid`` (instead of
17-
``axes_grid1``). The old version had a single namespace for all axes_grid
18-
objects, and in the new version this toolkit was broken
19-
into the two modules below. For the documentation on ``axes_grid``,
10+
AxesGrid toolkit has been a part of matplotlib since v
11+
0.99. Originally, the toolkit had a single namespace of
12+
*axes_grid*. In more recent version, the toolkit
13+
has divided into two separate namespace (*axes_grid1* and *axisartist*).
14+
While *axes_grid* namespace is maintained for the backward compatibility,
15+
use of *axes_grid1* and *axisartist* is recommended.
16+
For the documentation on ``axes_grid``,
2017
see the `previous version of the docs
2118
<https://matplotlib.org/2.0.1/mpl_toolkits/axes_grid/index.html#toolkit-axesgrid-index>`_.
2219

23-
..autosummary::
24-
:toctree: ../_as_gen
25-
:template: automodule.rst
20+
..toctree::
21+
:maxdepth:1
22+
23+
axes_grid1
24+
axisartist
25+
2626

27-
axes_grid1
28-
axisartist

‎doc/api/toolkits/axes_grid1.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. _toolkit_axesgrid1-index:
2+
3+
Matplotlib axes_grid1 Toolkit
4+
=============================
5+
6+
The matplotlib:class:`mpl_toolkits.axes_grid1` toolkit is a collection of
7+
helper classes to ease displaying multiple images in matplotlib. While the
8+
aspect parameter in matplotlib adjust the position of the single axes,
9+
axes_grid1 toolkit provides a framework to adjust the position of
10+
multiple axes according to their aspects.
11+
12+
See:ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
13+
14+
..figure::../../gallery/axes_grid1/images/sphx_glr_demo_axes_grid_001.png
15+
:target:../../gallery/axes_grid1/demo_axes_grid.html
16+
:align:center
17+
:scale:50
18+
19+
20+
21+
..currentmodule::mpl_toolkits
22+
23+
**The submodules of the axes_grid1 API are:**
24+
25+
..autosummary::
26+
:toctree: ../_as_gen
27+
:template: automodule.rst
28+
29+
axes_grid1.anchored_artists
30+
axes_grid1.axes_divider
31+
axes_grid1.axes_grid
32+
axes_grid1.axes_rgb
33+
axes_grid1.axes_size
34+
axes_grid1.colorbar
35+
axes_grid1.inset_locator
36+
axes_grid1.mpl_axes
37+
axes_grid1.parasite_axes
38+
39+

‎doc/api/toolkits/axisartist.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.. _toolkit_axisartist-index:
2+
3+
Matplotlib axisartist Toolkit
4+
=============================
5+
6+
The *axisartist* namespace includes a derived Axes implementation (
7+
:class:`mpl_toolkits.axisartist.Axes`). The
8+
biggest difference is that the artists that are responsible for drawing
9+
axis lines, ticks, ticklabels, and axis labels are separated out from the
10+
mpl's Axis class. This change was strongly motivated to support curvilinear grid.
11+
12+
You can find a tutorial describing usage of axisartist at the
13+
:ref:`axisartist_users-guide-index` user guide.
14+
15+
..figure::../../gallery/axisartist/images/sphx_glr_demo_curvelinear_grid_001.png
16+
:target:../../gallery/axisartist/demo_curvelinear_grid.html
17+
:align:center
18+
:scale:50
19+
20+
..currentmodule::mpl_toolkits
21+
22+
**The submodules of the axisartist API are:**
23+
24+
..autosummary::
25+
:toctree: ../_as_gen
26+
:template: automodule.rst
27+
28+
axisartist.angle_helper
29+
axisartist.axes_divider
30+
axisartist.axes_grid
31+
axisartist.axes_rgb
32+
axisartist.axis_artist
33+
axisartist.axisline_style
34+
axisartist.axislines
35+
axisartist.clip_path
36+
axisartist.floating_axes
37+
axisartist.grid_finder
38+
axisartist.grid_helper_curvelinear
39+
axisartist.parasite_axes
40+

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

Lines changed: 13 additions & 30 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

@@ -41,37 +41,20 @@ Links
4141
-----
4242
* mpl3d API::ref:`toolkit_mplot3d-api`
4343

44-
.._toolkit_axes_grid1:
44+
.._toolkit_axes_grid1_incl:
4545

46-
axes_grid1
47-
==========
46+
..include::axes_grid1.rst
47+
:start-line: 1
4848

49-
The:mod:`mpl_toolkits.axes_grid1` toolkit is a
50-
collection of helper classes for displaying multiple axes in Matplotlib.
49+
.. _toolkit_axisartist_incl:
50+
51+
..include::axisartist.rst
52+
:start-line: 1
5153

52-
..image::/_static/demo_axes_grid.png
53-
54-
..toctree::
55-
:maxdepth:2
56-
57-
axes_grid1/index.rst
58-
59-
60-
.. _toolkit_axisartist:
61-
62-
axisartist
63-
==========
64-
65-
The:mod:`mpl_toolkits.axisartist` toolkit contains
66-
a custom Axes class that is meant to support curvilinear grids.
67-
68-
..toctree::
69-
:maxdepth:2
70-
71-
axisartist/index.rst
54+
.. _toolkit_axes_grid_incl:
55+
56+
..include::axes_grid.rst
57+
:start-line: 1
7258

7359

74-
API
75-
---
76-
* Axes Grid and Axis Artist API::ref:`axes_grid-api-index`
7760

File renamed without changes.

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

Lines 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

Lines 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

Lines 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/mpl_toolkits/axes_grid1/index.rst

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎doc/mpl_toolkits/axisartist/index.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎lib/matplotlib/contour.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ class ContourSet(cm.ScalarMappable, ContourLabeler):
738738
"""
739739
Store a set of contour lines or filled regions.
740740
741-
User-callable method: `~.Axes.clabel`
741+
User-callable method: `~.axes.Axes.clabel`
742742
743743
Parameters
744744
----------
@@ -773,7 +773,7 @@ class ContourSet(cm.ScalarMappable, ContourLabeler):
773773
774774
kwargs :
775775
Keyword arguments are as described in the docstring of
776-
`~.Axes.contour`.
776+
`~.axes.Axes.contour`.
777777
778778
Attributes
779779
----------
@@ -803,7 +803,7 @@ def __init__(self, ax, *args, **kwargs):
803803
Parameters
804804
----------
805805
ax :
806-
The `.Axes` object to draw on.
806+
The `~.axes.Axes` object to draw on.
807807
808808
levels : [level0, level1, ..., leveln]
809809
A list of floating point numbers indicating the contour
@@ -834,7 +834,7 @@ def __init__(self, ax, *args, **kwargs):
834834
835835
**kwargs
836836
Keyword arguments are as described in the docstring of
837-
`~.Axes.contour`.
837+
`~axes.Axes.contour`.
838838
"""
839839
self.ax=ax
840840
self.levels=kwargs.pop('levels',None)
@@ -1436,7 +1436,7 @@ class QuadContourSet(ContourSet):
14361436
"""
14371437
Create and store a set of contour lines or filled regions.
14381438
1439-
User-callable method: `~.Axes.clabel`
1439+
User-callable method: `~axes.Axes.clabel`
14401440
14411441
Attributes
14421442
----------
@@ -1755,7 +1755,7 @@ def _initialize_x_y(self, z):
17551755
locator : ticker.Locator subclass, optional
17561756
The locator is used to determine the contour levels if they
17571757
are not given explicitly via *levels*.
1758-
Defaults to `.MaxNLocator`.
1758+
Defaults to `~.ticker.MaxNLocator`.
17591759
17601760
extend : {'neither', 'both', 'min', 'max'}, optional
17611761
Unless this is 'neither', contour levels are automatically

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp