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

Skip to content

Commit a7151fe

Browse files
committed
Improve mpl_toolkit documentation
1 parent a30b461 commit a7151fe

File tree

7 files changed

+296
-84
lines changed

7 files changed

+296
-84
lines changed

lib/mpl_toolkits/axes_grid1/axes_divider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,14 @@ def add_auto_adjustable_area(self, use_axes, pad=0.1, adjust_dirs=None):
291291
class AxesLocator:
292292
"""
293293
A callable object which returns the position and size of a given
294-
AxesDivider cell.
294+
`AxesDivider` cell.
295295
"""
296296

297297
def __init__(self, axes_divider, nx, ny, nx1=None, ny1=None):
298298
"""
299299
Parameters
300300
----------
301-
axes_divider : AxesDivider
301+
axes_divider : `AxesDivider`
302302
nx, nx1 : int
303303
Integers specifying the column-position of the
304304
cell. When *nx1* is None, a single *nx*-th column is
@@ -359,7 +359,7 @@ def __init__(self, fig, *args, horizontal=None, vertical=None,
359359
"""
360360
Parameters
361361
----------
362-
fig : `matplotlib.figure.Figure`
362+
fig : `~.figure.Figure`
363363
364364
*args : tuple (*nrows*, *ncols*, *index*) or int
365365
The array of subplots in the figure has dimensions ``(nrows,

lib/mpl_toolkits/axes_grid1/axes_rgb.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ def make_rgb_axes(ax, pad=0.01, axes_class=None, **kwargs):
88
"""
99
Parameters
1010
----------
11-
pad : float
12-
Fraction of the axes height.
11+
ax : `matplotlib.axes.Axes`
12+
Axes instance to create the RGB axes in.
13+
pad : float, optional
14+
Fraction of the axes height to pad.
15+
axes_class : `matplotlib.axes.Axes` or None, optional
16+
Axes class to use for the R, G, and B axes. If None, use
17+
the same class as *ax*.
18+
**kwargs :
19+
Forwarded to *axes_class* init for R, G, and B axes.
1320
"""
1421

1522
divider = make_axes_locatable(ax)
@@ -89,12 +96,12 @@ def __init__(self, *args, pad=0, **kwargs):
8996
----------
9097
pad : float, default: 0
9198
fraction of the axes height to put as padding.
92-
axes_class : matplotlib.axes.Axes
93-
99+
axes_class : `matplotlib.axes.Axes`
100+
Axes class to use. If not provided ``_defaultAxesClass`` is used.
94101
*args
95-
Unpacked into axes_class() init for RGB
102+
Forwarded to *axes_class* init for RGB
96103
**kwargs
97-
Unpacked into axes_class() init for RGB, R, G, B axes
104+
Forwarded to *axes_class* init for RGB, R, G, B axes
98105
"""
99106
axes_class = kwargs.pop("axes_class", self._defaultAxesClass)
100107
self.RGB = ax = axes_class(*args, **kwargs)
@@ -114,15 +121,15 @@ def imshow_rgb(self, r, g, b, **kwargs):
114121
----------
115122
r, g, b : array-like
116123
The red, green, and blue arrays.
117-
kwargs : imshow kwargs
118-
kwargs get unpacked into the imshow calls for the four images.
124+
**kwargs :
125+
Forwarded to `~.Axes.imshow` calls for the four images.
119126
120127
Returns
121128
-------
122-
rgb : matplotlib.image.AxesImage
123-
r : matplotlib.image.AxesImage
124-
g : matplotlib.image.AxesImage
125-
b : matplotlib.image.AxesImage
129+
rgb : `matplotlib.image.AxesImage`
130+
r : `matplotlib.image.AxesImage`
131+
g : `matplotlib.image.AxesImage`
132+
b : `matplotlib.image.AxesImage`
126133
"""
127134
if not (r.shape == g.shape == b.shape):
128135
raise ValueError(

0 commit comments

Comments
 (0)