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

Skip to content

Commit 0f066c3

Browse files
committed
Improve mpl_toolkit documentation
1 parent a01a1df commit 0f066c3

File tree

7 files changed

+226
-77
lines changed

7 files changed

+226
-77
lines changed

lib/mpl_toolkits/axes_grid1/axes_divider.py

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

293293
def __init__(self, axes_divider, nx, ny, nx1=None, ny1=None):
294294
"""
295295
Parameters
296296
----------
297-
axes_divider : AxesDivider
297+
axes_divider : `AxesDivider`
298298
nx, nx1 : int
299299
Integers specifying the column-position of the
300300
cell. When *nx1* is None, a single *nx*-th column is
@@ -355,7 +355,7 @@ def __init__(self, fig, *args, horizontal=None, vertical=None,
355355
"""
356356
Parameters
357357
----------
358-
fig : `matplotlib.figure.Figure`
358+
fig : `~.figure.Figure`
359359
360360
*args : tuple (*nrows*, *ncols*, *index*) or int
361361
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+
Unpacked into *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+
Unpacked into *axes_class* init for RGB
96103
**kwargs
97-
Unpacked into axes_class() init for RGB, R, G, B axes
104+
Unpacked into *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+
Unpacked into the `~.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)