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

Skip to content

Commit 9f22552

Browse files
committed
Minor docstring updates on binning related plot functions
1 parent 4257416 commit 9f22552

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4193,7 +4193,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
41934193
If *C* is specified, it specifies values at the coordinate
41944194
(x[i],y[i]). These values are accumulated for each hexagonal
41954195
bin and then reduced according to *reduce_C_function*, which
4196-
defaults to numpy's mean function (np.mean). (If *C* is
4196+
defaults to numpy's mean function (`numpy.mean`). (If *C* is
41974197
specified, it must also be a 1-D sequence of the same length
41984198
as *x* and *y*.)
41994199
@@ -4211,7 +4211,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
42114211
tuple with two elements specifying the number of hexagons
42124212
in the *x*-direction and the *y*-direction.
42134213
4214-
bins : {'log'} or int or sequence, optional, default is *None*
4214+
bins : 'log' or int or sequence, optional, default is *None*
42154215
If *None*, no binning is applied; the color of each hexagon
42164216
directly corresponds to its count value.
42174217
@@ -4287,11 +4287,9 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
42874287
42884288
Returns
42894289
-------
4290-
object
4291-
a :class:`~matplotlib.collections.PolyCollection` instance; use
4292-
:meth:`~matplotlib.collections.PolyCollection.get_array` on
4293-
this :class:`~matplotlib.collections.PolyCollection` to get
4294-
the counts in each hexagon.
4290+
polycollection
4291+
A `.PolyCollection` instance; use `.PolyCollection.get_array` on
4292+
this to get the counts in each hexagon.
42954293
42964294
If *marginals* is *True*, horizontal
42974295
bar and vertical bar (both PolyCollections) will be attached
@@ -6060,7 +6058,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
60606058
Input values, this takes either a single array or a sequence of
60616059
arrays which are not required to be of the same length
60626060
6063-
bins : integer or sequence or 'auto', optional
6061+
bins : int or sequence or 'auto', optional
60646062
If an integer is given, ``bins + 1`` bin edges are calculated and
60656063
returned, consistent with :func:`numpy.histogram`.
60666064
@@ -6094,7 +6092,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
60946092
60956093
Default is ``None``
60966094
6097-
density : boolean, optional
6095+
density : bool, optional
60986096
If ``True``, the first element of the return tuple will
60996097
be the counts normalized to form a probability density, i.e.,
61006098
the area (or integral) under the histogram will sum to 1.
@@ -6118,7 +6116,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
61186116
61196117
Default is ``None``
61206118
6121-
cumulative : boolean, optional
6119+
cumulative : bool, optional
61226120
If ``True``, then a histogram is computed where each bin gives the
61236121
counts in that bin plus all bins for smaller values. The last bin
61246122
gives the total number of datapoints. If *normed* or *density*
@@ -6178,7 +6176,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
61786176
61796177
Default is ``None``
61806178
6181-
log : boolean, optional
6179+
log : bool, optional
61826180
If ``True``, the histogram axis will be set to a log scale. If
61836181
*log* is ``True`` and *x* is a 1D array, empty bins will be
61846182
filtered out and only the non-empty ``(n, bins, patches)``
@@ -6192,14 +6190,14 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
61926190
61936191
Default is ``None``
61946192
6195-
label : string or None, optional
6193+
label : str or None, optional
61966194
String, or sequence of strings to match multiple datasets. Bar
61976195
charts yield multiple patches per dataset, but only the first gets
61986196
the label, so that the legend command will work as expected.
61996197
62006198
default is ``None``
62016199
6202-
stacked : boolean, optional
6200+
stacked : bool, optional
62036201
If ``True``, multiple data are stacked on top of each other If
62046202
``False`` multiple data are arranged side by side if histtype is
62056203
'bar' or on top of each other if histtype is 'step'
@@ -6553,10 +6551,10 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65536551
65546552
Parameters
65556553
----------
6556-
x, y: array_like, shape (n, )
6554+
x, y : array_like, shape (n, )
65576555
Input values
65586556
6559-
bins: [None | int | [int, int] | array_like | [array, array]]
6557+
bins : None or int or [int, int] or array_like or [array, array]
65606558
65616559
The bin specification:
65626560
@@ -6580,7 +6578,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65806578
xmax], [ymin, ymax]]. All values outside of this range will be
65816579
considered outliers and not tallied in the histogram.
65826580
6583-
normed : boolean, optional, default: False
6581+
normed : bool, optional, default: False
65846582
Normalize histogram.
65856583
65866584
weights : array_like, shape (n, ), optional, default: None
@@ -6610,7 +6608,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
66106608
66116609
Other Parameters
66126610
----------------
6613-
cmap : {Colormap, string}, optional
6611+
cmap : Colormap or str, optional
66146612
A :class:`matplotlib.colors.Colormap` instance. If not set, use rc
66156613
settings.
66166614
@@ -6619,7 +6617,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
66196617
scale luminance data to ``[0, 1]``. If not set, defaults to
66206618
``Normalize()``.
66216619
6622-
vmin/vmax : {None, scalar}, optional
6620+
vmin/vmax : None or scalar, optional
66236621
Arguments passed to the `Normalize` instance.
66246622
66256623
alpha : ``0 <= scalar <= 1`` or ``None``, optional

0 commit comments

Comments
 (0)