8000 Merge pull request #1108 from mdboom/fix_doc_warnings · matplotlib/matplotlib@dc535b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc535b4

Browse files
committed
Merge pull request #1108 from mdboom/fix_doc_warnings
Fix documentation warnings
2 parents 709c709 + 5c2af02 commit dc535b4

File tree

8 files changed

+63
-59
lines changed

8 files changed

+63
-59
lines changed

doc/mpl_toolkits/mplot3d/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Surface plots
6868

6969
Tri-Surface plots
7070
=================
71-
.. automethod:: Axes3D.plot_trisurface
71+
.. automethod:: Axes3D.plot_trisurf
7272

7373
.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py
7474

lib/matplotlib/animation.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ class MovieWriter(object):
7575
The use of the context manager ensures that setup and cleanup are
7676
performed as necessary.
7777
78-
Attributes
79-
----------
8078
frame_format: string
8179
The format used in writing frame data, defaults to 'rgba'
8280
'''
@@ -85,8 +83,6 @@ def __init__(self, fps=5, codec=None, bitrate=None, extra_args=None,
8583
'''
8684
Construct a new MovieWriter object.
8785
88-
Parameters
89-
----------
9086
fps: int
9187
Framerate for movie.
9288
codec: string or None, optional
@@ -103,7 +99,7 @@ def __init__(self, fps=5, codec=None, bitrate=None, extra_args=None,
10399
movie utiltiy. The default is None, which passes the additional
104100
argurments in the 'animation.extra_args' rcParam.
105101
metadata: dict of string:string or None
106-
A dictionary of keys and values for metadata to include in the
102+
A dictionary of keys and values for metadata to include in the
107103
output file. Some keys that may be of use include:
108104
title, artist, genre, subject, copyright, srcform, comment.
109105
'''
@@ -140,9 +136,6 @@ def setup(self, fig, outfile, dpi, *args):
140136
'''
141137
Perform setup for writing the movie file.
142138
143-
Parameters
144-
----------
145-
146139
fig: `matplotlib.Figure` instance
147140
The figure object that contains the information for frames
148141
outfile: string
@@ -164,7 +157,7 @@ def saving(self, *args):
164157
'''
165158
Context manager to facilitate writing the movie file.
166159
167-
*args are any parameters that should be passed to setup()
160+
``*args`` are any parameters that should be passed to `setup`.
168161
'''
169162
# This particular sequence is what contextlib.contextmanager wants
170163
self.setup(*args)
@@ -254,9 +247,6 @@ def setup(self, fig, outfile, dpi, frame_prefix='_tmp', clear_temp=True):
254247
'''
255248
Perform setup for writing the movie file.
256249
257-
Parameters
258-
----------
259-
260250
fig: `matplotlib.Figure` instance
261251
The figure object that contains the information for frames
262252
outfile: string

lib/matplotlib/axes.py

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4432,8 +4432,8 @@ def legend(self, *args, **kwargs):
44324432
instance. If *prop* is a dictionary, a new instance will be
44334433
created with *prop*. If *None*, use rc settings.
44344434
4435-
*fontsize*: [ size in points | 'xx-small' | 'x-small' | 'small' |
4436-
'medium' | 'large' | 'x-large' | 'xx-large' ]
4435+
*fontsize*: [ size in points | 'xx-small' | 'x-small' |
4436+
'small' | 'medium' | 'large' | 'x-large' | 'xx-large' ]
44374437
Set the font size. May be either a size string, relative to
44384438
the default font size, or an absolute font size in points. This
44394439
9E88 argument is only used if prop is not specified.
@@ -5602,17 +5602,17 @@ def boxplot(self, x, notch=False, sym='b+', vert=True, whis=1.5,
56025602
56035603
Returns a dictionary mapping each component of the boxplot
56045604
to a list of the :class:`matplotlib.lines.Line2D`
5605-
instances created. That disctionary has the following keys
5605+
instances created. That dictionary has the following keys
56065606
(assuming vertical boxplots):
5607-
boxes: the main body of the boxplot showing the quartiles
5608-
and the median's confidence intervals if enabled.
5609-
medians: horizonal lines at the median of each box.
5610-
whiskers: the vertical lines extending to the most extreme,
5611-
non-outlier data points.
5612-
caps: the horizontal lines at the ends of the whiskers.
5613-
fliers: points representing data that extend beyone the
5614-
whiskers (outliers).
56155607
5608+
- boxes: the main body of the boxplot showing the quartiles
5609+
and the median's confidence intervals if enabled.
5610+
- medians: horizonal lines at the median of each box.
5611+
- whiskers: the vertical lines extending to the most extreme,
5612+
n-outlier data points.
5613+
- caps: the horizontal lines at the ends of the whiskers.
5614+
- fliers: points representing data that extend beyone the
5615+
whiskers (outliers).
56165616
56175617
**Example:**
56185618
@@ -7828,6 +7828,8 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
78287828
ax.hist(12+3*np.random.randn(1000), label='women', alpha=0.5)
78297829
ax.legend()
78307830
7831+
.
7832+
78317833
kwargs are used to update the properties of the
78327834
:class:`~matplotlib.patches.Patch` instances returned by *hist*:
78337835
@@ -8121,23 +8123,35 @@ def hist2d(self, x, y, bins = 10, range=None, normed=False, weights=None,
81218123
hist2d(x, y, bins = None, range=None, weights=None, cmin=None, cmax=None **kwargs)
81228124
81238125
Make a 2d histogram plot of *x* versus *y*, where *x*,
8124-
*y* are 1-D sequences of the same length
8126+
*y* are 1-D sequences of the same length.
81258127
8126-
The return value is (counts,xedges,yedges,Image)
8128+
The return value is ``(counts, xedges, yedges, Image)``.
81278129
81288130
Optional keyword arguments:
81298131
*bins*: [None | int | [int, int] | array_like | [array, array]]
8132+
81308133
The bin specification:
8131-
If int, the number of bins for the two dimensions (nx=ny=bins).
8132-
If [int, int], the number of bins in each dimension (nx, ny = bins).
8133-
If array_like, the bin edges for the two dimensions (x_edges=y_edges=bins).
8134-
If [array, array], the bin edges in each dimension (x_edges, y_edges = bins).
8134+
8135+
- If int, the number of bins for the two dimensions
8136+
(nx=ny=bins).
8137+
8138+
- If [int, int], the number of bins in each dimension
8139+
(nx, ny = bins).
8140+
8141+
- If array_like, the bin edges for the two dimensions
8142+
(x_edges=y_edges=bins).
8143+
8144+
- If [array, array], the bin edges in each dimension
8145+
(x_edges, y_edges = bins).
8146+
81358147
The default value is 10.
81368148
81378149
*range*: [*None* | array_like shape(2,2)]
8138-
The leftmost and rightmost edges of the bins along each dimension (if not specified
8139-
explicitly in the bins parameters): [[xmin, xmax], [ymin, ymax]]. All values outside of
8140-
this range will be considered outliers and not tallied in the histogram.
8150+
The leftmost and rightmost edges of the bins along each
8151+
dimension (if not specified explicitly in the bins
8152+
parameters): [[xmin, xmax], [ymin, ymax]]. All values
8153+
outside of this range will be considered outliers and not
8154+
tallied in the histogram.
81418155
81428156
*normed*:[True|False]
81438157
Normalize histogram.
@@ -8147,12 +8161,15 @@ def hist2d(self, x, y, bins = 10, range=None, normed=False, weights=None,
81478161
An array of values w_i weighing each sample (x_i, y_i).
81488162
81498163
*cmin* : [None| scalar]
8150-
All bins that has count less than cmin will not be displayed
8151-
and these count values in the return value count histogram will also be set to nan upon return
8164+
All bins that has count less than cmin will not be
8165+
displayed and these count values in the return value
8166+
count histogram will also be set to nan upon return
81528167
81538168
*cmax* : [None| scalar]
8154-
All bins that has count more than cmax will not be displayed (set to none before passing to imshow)
8155-
and these count values in the return value count histogram will also be set to nan upon return
8169+
All bins that has count more than cmax will not be
8170+
displayed (set to none before passing to imshow) and
8171+
these count values in the return value count histogram
8172+
will also be set to nan upon return
81568173
81578174
Remaining keyword arguments are passed directly to :meth:pcolorfast
81588175

lib/matplotlib/projections/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def projection_factory(projection, figure, rect, **kwargs):
7777
Any other kwargs are passed along to the specific projection
7878
constructor being used.
7979
80-
.. deprecated::
80+
.. deprecated:: 1.3
8181
8282
This routine is deprecated in favour of getting the projection
8383
class directly with :func:`get_projection_class` and initialising it

lib/matplotlib/stackplot.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,25 @@
1515
def stackplot(axes, x, *args, **kwargs):
1616
"""Draws a stacked area plot.
1717
18-
Parameters
19-
----------
2018
*x* : 1d array of dimension N
19+
2120
*y* : 2d array of dimension MxN, OR any number 1d arrays each of dimension
2221
1xN. The data is assumed to be unstacked. Each of the following
23-
calls is legal:
22+
calls is legal::
2423
25-
stackplot(x, y) # where y is MxN
26-
staclplot(x, y1, y2, y3, y4) # where y1, y2, y3, y4, are all 1xNm
24+
stackplot(x, y) # where y is MxN
25+
stackplot(x, y1, y2, y3, y4) # where y1, y2, y3, y4, are all 1xNm
2726
2827
Keyword arguments:
28+
2929
*colors* : A list or tuple of colors. These will be cycled through and
3030
used to colour the stacked areas.
3131
All other keyword arguments are passed to
3232
:func:`~matplotlib.Axes.fill_between`
3333
34-
Returns
35-
-------
36-
*r* : A list of :class:`~matplotlib.collections.PolyCollection`, one for
37-
each element in the stacked area plot.
34+
Returns *r* : A list of
35+
:class:`~matplotlib.collections.PolyCollection`, one for each
36+
element in the stacked area plot.
3837
"""
3938

4039
if len(args) == 1:

lib/matplotlib/streamplot.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
1717
minlength=0.1):
1818
"""Draws streamlines of a vector flow.
1919
20-
Parameters
21-
----------
2220
*x*, *y* : 1d arrays
2321
an *evenly spaced* grid.
2422
*u*, *v* : 2d arrays
@@ -48,9 +46,7 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
4846
*minlength* : float
4947
Minimum length of streamline in axes coordinates.
5048
51-
Returns
52-
-------
53-
*streamlines* : :class:`~matplotlib.collections.LineCollection`
49+
Returns *streamlines* : :class:`~matplotlib.collections.LineCollection`
5450
Line collection with all streamlines as a series of line segments.
5551
Currently, there is no way to differentiate between line segments
5652
on different streamlines (other than manually checking that segments
@@ -552,4 +548,3 @@ def _gen_starting_points(shape):
552548
if y <= yfirst:
553549
yfirst +=1
554550
direction = 'right'
555-

lib/matplotlib/tight_layout.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,20 +212,25 @@ def get_renderer(fig):
212212
def get_tight_layout_figure(fig, axes_list, renderer,
213213
pad=1.08, h_pad=None, w_pad=None, rect=None):
214214
"""
215-
return subplot parameters for tigh-layouted- figure with
216-
specified padding.
215+
Return subplot parameters for tight-layouted-figure with specified
216+
padding.
217217
218218
Parameters:
219219
220220
*fig* : figure instance
221+
221222
*axes_list* : a list of axes
223+
222224
*renderer* : renderer instance
225+
223226
*pad* : float
224227
padding between the figure edge and the edges of subplots,
225228
as a fraction of the font-size.
229+
226230
*h_pad*, *w_pad* : float
227231
padding (height/width) between edges of adjacent subplots.
228232
Defaults to `pad_inches`.
233+
229234
*rect* : if rect is given, it is interpreted as a rectangle
230235
(left, bottom, right, top) in the normalized figure
231236
coordinate that the whole subplots area (including
@@ -323,4 +328,3 @@ def get_tight_layout_figure(fig, axes_list, renderer,
323328
rect=(left, bottom, right, top))
324329

325330
return kwargs
326-

lib/matplotlib/widgets.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,8 +1518,8 @@ class Lasso(AxesWidget):
15181518
"""Selection curve of an arbitrary shape.
15191519
15201520
The selected path can be used in conjunction with
1521-
:function:`~matplotlib.path.Path.contains_point` to select
1522-
data points from an image.
1521+
:func:`~matplotlib.path.Path.contains_point` to select data points
1522+
from an image.
15231523
15241524
Unlike :class:`LassoSelector`, this must be initialized with a starting
15251525
point `xy`, and the `Lasso` events are destroyed upon release.
@@ -1578,4 +1578,3 @@ def onmove(self, event):
15781578
self.canvas.blit(self.ax.bbox)
15791579
else:
15801580
self.canvas.draw_idle()
1581-

0 commit comments

Comments
 (0)
0