Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b7ce9e

Browse files
committed
* Remove matplotlib.legend from artist_api.rst since it is document in legend_api
* Fix pyplot docstring :module: -> :mod to remove error: Unknown interpreted text role "module". * Fix pyplot tight_layout docstring to get rid of 'Unexpected section title.' error * reformatted docstring in tight_layout.auto_adjust_subplotpars * fix what's new bullet list ends w/o blank line issues * remove plotting.rst and arraydata.rst stub docs * Added environment_variables.rst to FAQ index * removed normed warning on Axes.hist * fix an nxutils.point_inside_poly docstring definition list bug
1 parent 0c7f83d commit 2b7ce9e

File tree

12 files changed

+38
-266
lines changed

12 files changed

+38
-266
lines changed

doc/api/artist_api.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ artists
1515
:undoc-members:
1616
:show-inheritance:
1717

18-
:mod:`matplotlib.legend`
19-
=============================
20-
21-
.. automodule:: matplotlib.legend
22-
:members:
23-
:undoc-members:
24-
:show-inheritance:
2518

2619
:mod:`matplotlib.lines`
2720
=============================

doc/faq/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ The Matplotlib FAQ
1818
usage_faq.rst
1919
howto_faq.rst
2020
troubleshooting_faq.rst
21+
environment_variables_faq.rst
22+

doc/matplotlibrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ docstring.hardcopy : True # set this when you want to generate hardcopy docstri
1313

1414
#examples.download : False # False to bypass downloading mechanism
1515
#examples.directory : /your/path/to/sample_data/ # directory to look in if download is false
16+

doc/users/arraydata.rst

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

doc/users/plotting.rst

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

doc/users/whats_new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ as 2D plotting, Ben Root has made several improvements to the
133133
* Most 3D plotting functions now support empty inputs
134134

135135
* Ticker offset display added:
136+
136137
.. plot:: mpl_examples/mplot3d/offset_demo.py
137138

138139
* :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf`
139140
gains *zdir* and *offset* kwargs. You can now do this:
141+
140142
.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py
141143

142144
Numerix support removed

lib/matplotlib/axes.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ def grid(self, b=None, which='major', axis='both', **kwargs):
20672067
*axis* can be 'both' (default), 'x', or 'y' to control which
20682068
set of gridlines are drawn.
20692069
2070-
*kawrgs* are used to set the grid line properties, eg::
2070+
*kwargs* are used to set the grid line properties, eg::
20712071
20722072
ax.grid(color='r', linestyle='-', linewidth=2)
20732073
@@ -7662,16 +7662,6 @@ def hist(x, bins=10, range=None, normed=False, weights=None,
76627662
db = np.diff(bins)
76637663
m = (m.astype(float) / db) / m.sum()
76647664
n.append(m)
7665-
if normed and db.std() > 0.01 * db.mean():
7666-
warnings.warn("""
7667-
This release fixes a normalization bug in the NumPy histogram
7668-
function prior to version 1.5, occuring with non-uniform
7669-
bin widths. The returned and plotted value is now a density:
7670-
n / (N * bin width),
7671-
where n is the bin count and N the total number of points.
7672-
""")
7673-
7674-
76757665

76767666
if cumulative:
76777667
slc = slice(None)

lib/matplotlib/figure.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,10 +1310,11 @@ def get_tightbbox(self, renderer):
13101310

13111311

13121312
def tight_layout(self, renderer=None, pad=1.2, h_pad=None, w_pad=None):
1313-
"""Adjust subplot parameters to give specified padding.
1313+
"""
1314+
Adjust subplot parameters to give specified padding.
1315+
1316+
Parameters:
13141317
1315-
Parameters
1316-
----------
13171318
pad : float
13181319
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
13191320
h_pad, w_pad : float

lib/matplotlib/gridspec.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,11 @@ def locally_modified_subplot_params(self):
268268

269269

270270
def tight_layout(self, fig, renderer=None, pad=1.2, h_pad=None, w_pad=None, rect=None):
271-
"""Adjust subplot parameters to give specified padding.
271+
"""
272+
Adjust subplot parameters to give specified padding.
272273
273-
Parameters
274-
----------
274+
Parameters:
275+
275276
pad : float
276277
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
277278
h_pad, w_pad : float

lib/matplotlib/pyplot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def draw():
457457
458458
A more object-oriented alternative, given any
459459
:class:`~matplotlib.figure.Figure` instance, :attr:`fig`, that
460-
was created using a :module:`~matplotlib.pyplot` function, is::
460+
was created using a :mod:`~matplotlib.pyplot` function, is::
461461
462462
fig.canvas.draw()
463463
@@ -1035,10 +1035,11 @@ def subplot_tool(targetfig=None):
10351035

10361036

10371037
def tight_layout(pad=1.2, h_pad=None, w_pad=None):
1038-
"""Adjust subplot parameters to give specified padding.
1038+
"""
1039+
Adjust subplot parameters to give specified padding.
1040+
1041+
Parameters:
10391042
1040-
Parameters
1041-
----------
10421043
pad : float
10431044
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
10441045
h_pad, w_pad : float

lib/matplotlib/tight_layout.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,28 @@ def auto_adjust_subplotpars(fig, renderer,
4242
Return a dictionary of subplot parameters so that spacing between
4343
subplots are adjusted. Note that this function ignore geometry
4444
information of subplot itself, but uses what is given by
45-
nrows_ncols and num1num2_list parameteres. Also, the results could be
46-
incorrect if some subplots have adjustable=datalim.
45+
*nrows_ncols* and *num1num2_list* parameteres. Also, the results could be
46+
incorrect if some subplots have ``adjustable=datalim``.
4747
48-
Parameters
49-
----------
50-
nrows_ncols : number of rows and number of columns of the grid.
51-
num1num2_list : list of numbers specifying the area occupied by the subplot
52-
subplot_list : list of subplots that will be used to calcuate optimal subplot_params.
48+
Parameters:
49+
50+
nrows_ncols
51+
number of rows and number of columns of the grid.
52+
53+
num1num2_list
54+
list of numbers specifying the area occupied by the subplot
55+
56+
subplot_list
57+
list of subplots that will be used to calcuate optimal subplot_params.
58+
5359
pad : float
54-
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
60+
padding between the figure edge and the edges of subplots, as a fraction of the font-size.
5561
h_pad, w_pad : float
56-
padding (height/width) between edges of adjacent subplots.
62+
padding (height/width) between edges of adjacent subplots.
5763
Defaults to `pad_inches`.
58-
rect : [left, bottom, right, top] in normalized (0, 1) figure coordinates.
64+
65+
rect
66+
[left, bottom, right, top] in normalized (0, 1) figure coordinates.
5967
"""
6068

6169

src/nxutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static PyMethodDef module_methods[] = {
231231
"Return a boolean ndarray, True for points inside the polygon.\n\n"
232232
"*xypoints*\n a sequence of N x,y pairs.\n"
233233
"*xyverts*\n sequence of x,y vertices of the polygon.\n"
234-
"*mask* an ndarray of length N.\n\n"
234+
"*mask*\n an ndarray of length N.\n\n"
235235
"A point on the boundary may be treated as inside or outside.\n"
236236
"See `pnpoly <http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_\n"},
237237
{NULL} /* Sentinel */

0 commit comments

Comments
 (0)