8000 SG for toolkits · matplotlib/matplotlib@46a8349 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46a8349

Browse files
committed
SG for toolkits
1 parent 74fa27b commit 46a8349

33 files changed

+521
-649
lines changed

doc/_templates/automodule.rst

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,22 @@
55
:no-members:
66
:no-inherited-members:
77

8-
{% block functions %}
9-
{% if functions %}
8+
{% block classes %}
9+
{% if classes %}
1010

1111
Classes
1212
-------
1313

1414
.. autosummary::
1515
:template: autosummary.rst
1616
:toctree:
17-
18-
{% for item in classes %}
19-
{{ item }}
20-
{% endfor %}
17+
{% for item in classes %}{% if item not in ['zip', 'map', 'reduce'] %}
18+
{{ item }}{% endif %}{% endfor %}
2119
{% endif %}
2220
{% endblock %}
2321

24-
{% block exceptions %}
25-
{% if exceptions %}
22+
{% block functions %}
23+
{% if functions %}
2624

2725
Functions
2826
---------
@@ -31,21 +29,7 @@ Functions
3129
:template: autosummary.rst
3230
:toctree:
3331

34-
{% for item in functions %}
35-
{{ item }}
36-
{% endfor %}
32+
{% for item in functions %}{% if item not in ['zip', 'map', 'reduce'] %}
33+
{{ item }}{% endif %}{% endfor %}
3734
{% endif %}
3835
{% endblock %}
39-
40-
{% block classes %}
41-
{% if classes %}
42-
43-
Exceptions
44-
----------
45-
46-
.. autosummary::
47-
{% for item in exceptions %}
48-
{{ item }}
49-
{%- endfor %}
50-
{% endif %}
51-
{% endblock %}

doc/api/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,13 @@
6565
:template: autofunctions.rst
6666

6767
pyplot
68+
69+
70+
Toolkits
71+
--------
72+
73+
.. toctree::
74+
:maxdepth: 1
75+
76+
toolkits/axes_grid.rst
77+
toolkits/mplot3d.rst

doc/api/toolkits/axes_grid.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _axes_grid-api-index:
2+
3+
####################################
4+
The Matplotlib axes_grid Toolkit API
5+
####################################
6+
7+
:Release: |version|
8+
:Date: |today|
9+
10+
.. currentmodule:: mpl_toolkits
11+
12+
Axes Grid
13+
---------
14+
15+
.. autosummary::
16+
:toctree: ../_as_gen
17+
:template: automodule.rst
18+
19+
axes_grid
20+
axes_grid1
21+
axisartist

doc/api/toolkits/mplot3d.rst

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
.. _toolkit_mplot3d-api:
2+
3+
***********
4+
mplot3d API
5+
***********
6+
7+
.. contents::
8+
:backlinks: none
9+
10+
.. currentmodule:: mpl_toolkits.mplot3d
11+
12+
.. _toolkit_mplot3d-axesapi:
13+
14+
:mod:`~mpl_toolkits.mplot3d.axes3d`
15+
===================================
16+
17+
.. note::
18+
Significant effort went into bringing axes3d to feature-parity with
19+
regular axes objects for version 1.1.0. However, more work remains.
20+
Please report any functions that do not behave as expected as a bug.
21+
In addition, help and patches would be greatly appreciated!
22+
23+
.. autosummary::
24+
:toctree: ../_as_gen
25+
:template: autosummary.rst
26+
27+
axes3d.Axes
28+
axes3d.Axes3D
29+
axes3d.Bbox
30+
axes3d.LightSource
31+
axes3d.Normalize
32+
axes3d.Triangulation
33+
34+
35+
.. _toolkit_mplot3d-axisapi:
36+
37+
:mod:`~mpl_toolkits.mplot3d.axis3d`
38+
===================================
39+
40+
.. note::
41+
Historically, axis3d has suffered from having hard-coded constants
42+
controlling the look and feel of the 3D plot. This precluded user
43+
level adjustments such as label spacing, font colors and panel colors.
44+
For version 1.1.0, these constants have been consolidated into a single
45+
private member dictionary, `self._axinfo`, for the axis object. This is
46+
intended only as a stop-gap measure to allow user-level customization,
47+
but it is not intended to be permanent.
48+
49+
.. autosummary::
50+
:toctree: ../_as_gen
51+
:template: autosummary.rst
52+
53+
axis3d.Axis
54+
axis3d.XAxis
55+
axis3d.YAxis
56+
axis3d.ZAxis
57+
axis3d.get_flip_min_max
58+
axis3d.move_from_center
59+
axis3d.tick_update_position
60+
61+
62+
.. _toolkit_mplot3d-artapi:
63+
64+
:mod:`~mpl_toolkits.mplot3d.art3d`
65+
==================================
66+
67+
.. autosummary::
68+
:toctree: ../_as_gen
69+
:template: autosummary.rst
70+
71+
art3d.Line3D
72+
art3d.Line3DCollection
73+
art3d.Patch3D
74+
art3d.Patch3DCollection
75+
art3d.Path3DCollection
76+
art3d.PathPatch3D
77+
art3d.Poly3DCollection
78+
art3d.Text3D
79+
art3d.get_colors
80+
art3d.get_dir_vector
81+
art3d.get_patch_verts
82+
art3d.iscolor
83+
art3d.juggle_axes
84+
art3d.line_2d_to_3d
85+
art3d.line_collection_2d_to_3d
86+
art3d.norm_angle
87+
art3d.norm_text_angle
88+
art3d.patch_2d_to_3d
89+
art3d.patch_collection_2d_to_3d
90+
art3d.path_to_3d_segment
91+
art3d.path_to_3d_segment_with_codes
92+
art3d.pathpatch_2d_to_3d
93+
art3d.paths_to_3d_segments
94+
art3d.paths_to_3d_segments_with_codes
95+
art3d.poly_collection_2d_to_3d
96+
art3d.rotate_axes
97+
art3d.text_2d_to_3d
98+
art3d.zalpha
99+
100+
.. _toolkit_mplot3d-projapi:
101+
102+
:mod:`~mpl_toolkits.mplot3d.proj3d`
103+
===================================
104+
105+
.. autosummary::
106+
:toctree: ../_as_gen
107+
:template: autosummary.rst
108+
109+
proj3d.inv_transform
110+
proj3d.line2d
111+
proj3d.line2d_dist
112+
proj3d.line2d_seg_dist
113+
proj3d.mod
114+
proj3d.persp_transformation
115+
proj3d.proj_points
116+
proj3d.proj_trans_clip_points
117+
proj3d.proj_trans_points
118+
proj3d.proj_transform
119+
proj3d.proj_transform_clip
120+
proj3d.proj_transform_vec
121+
proj3d.proj_transform_vec_clip
122+
proj3d.rot_x
123+
proj3d.transform
124+
proj3d.vec_pad_ones
125+
proj3d.view_transformation
126+
proj3d.world_transformation

doc/conf.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _check_deps():
101101
'examples_dirs': ['../examples', '../tutorials'],
102102
'filename_pattern': '^((?!sgskip).)*$',
103103
'gallery_dirs': ['gallery', 'tutorials'],
104-
'doc_module': ('matplotlib',),
104+
'doc_module': ('matplotlib', 'mpl_toolkits'),
105105
'reference_url': {'matplotlib': None,
106106
'numpy': 'http://docs.scipy.org/doc/numpy/reference',
107107
'scipy': 'http://docs.scipy.org/doc/scipy/reference'},
@@ -167,32 +167,6 @@ def _check_deps():
167167

168168
plot_formats = [('png', 100), ('pdf', 100)]
169169

170-
# Subdirectories in 'examples/' directory of package and titles for gallery
171-
mpl_example_sections = [
172-
('lines_bars_and_markers', 'Lines, bars, and markers'),
173-
('shapes_and_collections', 'Shapes and collections'),
174-
('statistics', 'Statistical plots'),
175-
('images_contours_and_fields', 'Images, contours, and fields'),
176-
('pie_and_polar_charts', 'Pie and polar charts'),
177-
('color', 'Color'),
178-
('text_labels_and_annotations', 'Text, labels, and annotations'),
179-
('ticks_and_spines', 'Ticks and spines'),
180-
('scales', 'Axis scales'),
181-
('subplots_axes_and_figures', 'Subplots, axes, and figures'),
182-
('style_sheets', 'Style sheets'),
183-
('specialty_plots', 'Specialty plots'),
184-
('showcase', 'Showcase'),
185-
('api', 'API'),
186-
('pylab_examples', 'pylab examples'),
187-
('mplot3d', 'mplot3d toolkit'),
188-
('axes_grid1', 'axes_grid1 toolkit'),
189-
('axisartist', 'axisartist toolkit'),
190-
('units', 'units'),
191-
('widgets', 'widgets'),
192-
('misc', 'Miscellaneous examples'),
193-
]
194-
195-
196170
# Github extension
197171

198172
github_project_url = "https://github.com/matplotlib/matplotlib/"

doc/make.py

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,8 @@ def clean():
202202
"""Remove generated files. """
203203
shutil.rmtree("build", ignore_errors=True)
204204
shutil.rmtree("examples", ignore_errors=True)
205-
for pattern in ['mpl_examples/api/*.png',
206-
'mpl_examples/pylab_examples/*.png',
207-
'mpl_examples/pylab_examples/*.pdf',
208-
'mpl_examples/units/*.png',
209-
'mpl_examples/pyplots/tex_demo.png',
210-
'_static/matplotlibrc',
205+
shutil.rmtree("api/_as_gen", ignore_errors=True)
206+
for pattern in ['_static/matplotlibrc',
211207
'_templates/gallery.html',
212208
'users/installing.rst']:
213209
for filename in glob.glob(pattern):
@@ -247,40 +243,6 @@ def build_all():
247243
os.chdir(os.path.dirname(os.path.join(current_dir, __file__)))
248244
copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst')
249245

250-
# Create the examples symlink, if it doesn't exist
251-
252-
required_symlinks = [
253-
('mpl_examples', '../examples/'),
254-
('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid1/'),
255-
('mpl_toolkits/axisartist/examples', '../../../examples/axisartist/')
256-
]
257-
258-
symlink_warnings = []
259-
for link, target in required_symlinks:
260-
if sys.platform == 'win32' and os.path.isfile(link):
261-
# This is special processing that applies on platforms that don't deal
262-
# with git symlinks -- probably only MS windows.
263-
delete = False
264-
with open(link, 'r') as link_content:
265-
delete = target == link_content.read()
266-
if delete:
267-
symlink_warnings.append('deleted: doc/{0}'.format(link))
268-
os.unlink(link)
269-
else:
270-
raise RuntimeError("doc/{0} should be a directory or symlink -- it"
271-
" isn't".format(link))
272-
if not os.path.exists(link):
273-
try:
274-
os.symlink(os.path.normcase(target), link)
275-
except OSError:
276-
symlink_warnings.append('files copied to {0}'.format(link))
277-
shutil.copytree(os.path.join(link, '..', target), link)
278-
279-
if sys.platform == 'win32' and len(symlink_warnings) > 0:
280-
print('The following items related to symlinks will show up '
281-
'as spurious changes in your \'git status\':\n\t{0}'
282-
.format('\n\t'.join(symlink_warnings)))
283-
284246
parser = argparse.ArgumentParser(description='Build matplotlib docs')
285247
parser.add_argument("cmd", help=("Command to execute. Can be multiple. "
286248
"Valid options are: %s" % (funcd.keys())), nargs='*')

doc/mpl_toolkits/axes_grid1/api/anchored_artists_api.rst

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

doc/mpl_toolkits/axes_grid1/api/axes_divider_api.rst

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

doc/mpl_toolkits/axes_grid1/api/axes_grid_api.rst

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

doc/mpl_toolkits/axes_grid1/api/axes_size_api.rst

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

doc/mpl_toolkits/axes_grid1/api/index.rst

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

doc/mpl_toolkits/axes_grid1/api/inset_locator_api.rst

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

doc/mpl_toolkits/axes_grid1/examples

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)
0