Skip to content

Commit dcda8b9

Browse files
committed
[Doc] Small fixes found by velin
1 parent 781c6a0 commit dcda8b9

File tree

13 files changed

+67
-35
lines changed

13 files changed

+67
-35
lines changed

lib/matplotlib/_constrained_layout.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ def do_constrained_layout(fig, h_pad, w_pad,
7272
fig : Figure
7373
``Figure`` instance to do the layout in.
7474
75-
renderer : Renderer
76-
Renderer to use.
77-
7875
h_pad, w_pad : float
7976
Padding around the axes elements in figure-normalized units.
8077
@@ -578,7 +575,12 @@ def match_submerged_margins(layoutgrids, fig):
578575

579576
def get_cb_parent_spans(cbax):
580577
"""
581-
Figure out which subplotspecs this colorbar belongs to:
578+
Figure out which subplotspecs this colorbar belongs to.
579+
580+
Parameters
581+
----------
582+
cbax : Axes
583+
Axes for the colorbar.
582584
"""
583585
rowstart = np.inf
584586
rowstop = -np.inf
@@ -602,8 +604,8 @@ def get_pos_and_bbox(ax, renderer):
602604
603605
Parameters
604606
----------
605-
ax
606-
renderer
607+
ax : Axes
608+
renderer : Renderer
607609
608610
Returns
609611
-------
@@ -672,18 +674,19 @@ def reposition_colorbar(layoutgrids, cbax, renderer, *, offset=None):
672674
673675
Parameters
674676
----------
677+
layoutgrids : dict
675678
cbax : Axes
676-
Axes for the colorbar
677-
678-
renderer :
679+
Axes for the colorbar.
680+
renderer : Renderer
681+
The renderer to use.
679682
w_pad, h_pad : float
680-
width and height padding (in fraction of figure)
683+
Width and height padding (in fraction of figure).
681684
hspace, wspace : float
682-
width and height padding as fraction of figure size divided by
683-
number of columns or rows
685+
Width and height padding as fraction of figure size divided by
686+
number of columns or rows.
684687
margin : array-like
685-
offset the colorbar needs to be pushed to in order to
686-
account for multiple colorbars
688+
Offset the colorbar needs to be pushed to in order to
689+
account for multiple colorbars.
687690
"""
688691

689692
parents = cbax._colorbar_info['parents']

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,15 @@ def draw_markers(self, gc, marker_path, marker_trans, path,
208208
----------
209209
gc : `.GraphicsContextBase`
210210
The graphics context.
211+
marker_path : `~matplotlib.path.Path`
212+
The path for the marker.
211213
marker_trans : `~matplotlib.transforms.Transform`
212214
An affine transform applied to the marker.
215+
path : `~matplotlib.path.Path`
216+
The locations to draw the markers.
213217
trans : `~matplotlib.transforms.Transform`
214218
An affine transform applied to the path.
219+
rgbFace : color, optional
215220
"""
216221
for vertices, codes in path.iter_segments(trans, simplify=False):
217222
if len(vertices):

lib/matplotlib/backends/_backend_pdf_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_glyphs_subset(fontfile, characters):
2828
2929
Parameters
3030
----------
31-
symbol : str
31+
fontfile : str
3232
Path to the font file
3333
characters : str
3434
Continuous set of characters to include in subset

lib/matplotlib/backends/backend_svg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def end(self, tag=None, indent=True):
200200
tag
201201
Element tag. If given, the tag must match the start tag. If
202202
omitted, the current element is closed.
203+
indent : bool, default: True
203204
"""
204205
if tag:
205206
assert self.__tags, f"unbalanced end({tag})"

lib/matplotlib/colors.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,6 +2300,18 @@ def __init__(self, azdeg=315, altdeg=45, hsv_min_val=0, hsv_max_val=1,
23002300
altdeg : float, default: 45 degrees
23012301
The altitude (0-90, degrees up from horizontal) of the light
23022302
source.
2303+
hsv_min_val : number, default: 0
2304+
The minimum value ("v" in "hsv") that the *intensity* map can shift the
2305+
output image to.
2306+
hsv_max_val : number, default: 1
2307+
The maximum value ("v" in "hsv") that the *intensity* map can shift the
2308+
output image to.
2309+
hsv_min_sat : number, default: 1
2310+
The minimum saturation value that the *intensity* map can shift the output
2311+
image to.
2312+
hsv_max_sat : number, default: 0
2313+
The maximum saturation value that the *intensity* map can shift the output
2314+
image to.
23032315
23042316
Notes
23052317
-----
@@ -2599,12 +2611,12 @@ def blend_hsv(self, rgb, intensity, hsv_max_sat=None, hsv_max_val=None,
25992611
An (M, N, 3) RGB array of floats ranging from 0 to 1 (color image).
26002612
intensity : `~numpy.ndarray`
26012613
An (M, N, 1) array of floats ranging from 0 to 1 (grayscale image).
2602-
hsv_max_sat : number, default: 1
2614+
hsv_max_sat : number, optional
26032615
The maximum saturation value that the *intensity* map can shift the
2604-
output image to.
2616+
output image to. Defaults to 0.
26052617
hsv_min_sat : number, optional
26062618
The minimum saturation value that the *intensity* map can shift the
2607-
output image to. Defaults to 0.
2619+
output image to. Defaults to 1.
26082620
hsv_max_val : number, optional
26092621
The maximum value ("v" in "hsv") that the *intensity* map can shift
26102622
the output image to. Defaults to 1.

lib/matplotlib/legend_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def create_artists(self, legend, orig_handle,
155155
fontsize : int
156156
The fontsize in pixels. The legend artists being created should
157157
be scaled according to the given fontsize.
158-
trans : `~matplotlib.transforms.Transform`
158+
trans : `~matplotlib.transforms.Transform`
159159
The transform that is applied to the legend artists being created.
160160
Typically from unit coordinates in the handler box to screen
161161
coordinates.

lib/matplotlib/patches.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,10 @@ def __init__(self, values, edges, *,
994994
True or an array is passed to *baseline*, a closed
995995
path is drawn.
996996
997-
Other valid keyword arguments are:
997+
**kwargs
998+
`Patch` properties:
998999
999-
%(Patch:kwdoc)s
1000+
%(Patch:kwdoc)s
10001001
"""
10011002
self.orientation = orientation
10021003
self._edges = np.asarray(edges)
@@ -1112,7 +1113,7 @@ def set_closed(self, closed):
11121113
Parameters
11131114
----------
11141115
closed : bool
1115-
True if the polygon is closed
1116+
True if the polygon is closed
11161117
"""
11171118
if self._closed == bool(closed):
11181119
return

lib/mpl_toolkits/axes_grid1/axes_divider.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def __init__(self, fig, pos, horizontal, vertical,
3737
Sizes for horizontal division.
3838
vertical : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
3939
Sizes for vertical division.
40-
aspect : bool
40+
aspect : bool, optional
4141
Whether overall rectangular area is reduced so that the relative
4242
part of the horizontal and vertical scales have the same scale.
4343
anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', \
44-
'NW', 'W'}
44+
'NW', 'W'}, default: 'C'
4545
Placement of the reduced rectangle, when *aspect* is True.
4646
"""
4747

@@ -294,7 +294,7 @@ def add_auto_adjustable_area(self, use_axes, pad=0.1, adjust_dirs=None):
294294
----------
295295
use_axes : `~matplotlib.axes.Axes` or list of `~matplotlib.axes.Axes`
296296
The Axes whose decorations are taken into account.
297-
pad : float, optional
297+
pad : float, default: 0.1
298298
Additional padding in inches.
299299
adjust_dirs : list of {"left", "right", "bottom", "top"}, optional
300300
The sides where padding is added; defaults to all four sides.
@@ -377,6 +377,16 @@ def __init__(self, fig, *args, horizontal=None, vertical=None,
377377
If *nrows*, *ncols*, and *index* are all single digit numbers, then
378378
*args* can be passed as a single 3-digit number (e.g. 234 for
379379
(2, 3, 4)).
380+
horizontal : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
381+
Sizes for horizontal division.
382+
vertical : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
383+
Sizes for vertical division.
384+
aspect : bool, optional
385+
Whether overall rectangular area is reduced so that the relative
386+
part of the horizontal and vertical scales have the same scale.
387+
anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', \
388+
'NW', 'W'}, default: 'C'
389+
Placement of the reduced rectangle, when *aspect* is True.
380390
"""
381391
self.figure = fig
382392
super().__init__(fig, [0, 0, 1, 1],

lib/mpl_toolkits/axes_grid1/axes_rgb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def make_rgb_axes(ax, pad=0.01, axes_class=None, **kwargs):
1717
axes_class : `matplotlib.axes.Axes` or None, optional
1818
Axes class to use for the R, G, and B Axes. If None, use
1919
the same class as *ax*.
20-
**kwargs :
20+
**kwargs
2121
Forwarded to *axes_class* init for the R, G, and B Axes.
2222
"""
2323

@@ -130,7 +130,7 @@ def imshow_rgb(self, r, g, b, **kwargs):
130130
----------
131131
r, g, b : array-like
132132
The red, green, and blue arrays.
133-
**kwargs :
133+
**kwargs
134134
Forwarded to `~.Axes.imshow` calls for the four images.
135135
136136
Returns

lib/mpl_toolkits/axes_grid1/parasite_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def get_aux_axes(
105105
axes_class : subclass type of `~matplotlib.axes.Axes`, optional
106106
The `~.axes.Axes` subclass that is instantiated. If None, the base
107107
class of the host axes is used.
108-
kwargs
108+
**kwargs
109109
Other parameters are forwarded to the parasite axes constructor.
110110
"""
111111
if axes_class is None:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy