-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Minor docstring updates on binning related plot functions #10831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4191,11 +4191,10 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None, | |
of the observations at (x[i],y[i]). | ||
|
||
If *C* is specified, it specifies values at the coordinate | ||
(x[i],y[i]). These values are accumulated for each hexagonal | ||
(x[i], y[i]). These values are accumulated for each hexagonal | ||
bin and then reduced according to *reduce_C_function*, which | ||
defaults to numpy's mean function (np.mean). (If *C* is | ||
specified, it must also be a 1-D sequence of the same length | ||
as *x* and *y*.) | ||
defaults to `numpy.mean`. (If *C* is specified, it must also | ||
be a 1-D sequence of the same length as *x* and *y*.) | ||
|
||
Parameters | ||
---------- | ||
|
@@ -4211,7 +4210,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None, | |
tuple with two elements specifying the number of hexagons | ||
in the *x*-direction and the *y*-direction. | ||
|
||
bins : {'log'} or int or sequence, optional, default is *None* | ||
bins : 'log' or int or sequence, optional, default is *None* | ||
If *None*, no binning is applied; the color of each hexagon | ||
directly corresponds to its count value. | ||
|
||
|
@@ -4287,11 +4286,9 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None, | |
|
||
Returns | ||
------- | ||
object | ||
a :class:`~matplotlib.collections.PolyCollection` instance; use | ||
:meth:`~matplotlib.collections.PolyCollection.get_array` on | ||
this :class:`~matplotlib.collections.PolyCollection` to get | ||
the counts in each hexagon. | ||
polycollection | ||
A `.PolyCollection` instance; use `.PolyCollection.get_array` on | ||
this to get the counts in each hexagon. | ||
|
||
If *marginals* is *True*, horizontal | ||
bar and vertical bar (both PolyCollections) will be attached | ||
|
@@ -6058,11 +6055,11 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
---------- | ||
x : (n,) array or sequence of (n,) arrays | ||
Input values, this takes either a single array or a sequence of | ||
arrays which are not required to be of the same length | ||
arrays which are not required to be of the same length. | ||
|
||
bins : integer or sequence or 'auto', optional | ||
bins : int or sequence or str, optional | ||
If an integer is given, ``bins + 1`` bin edges are calculated and | ||
returned, consistent with :func:`numpy.histogram`. | ||
returned, consistent with `numpy.histogram`. | ||
|
||
If `bins` is a sequence, gives bin edges, including left edge of | ||
first bin and right edge of last bin. In this case, `bins` is | ||
|
@@ -6079,9 +6076,12 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Unequally spaced bins are supported if *bins* is a sequence. | ||
|
||
If Numpy 1.11 is installed, may also be ``'auto'``. | ||
With Numpy 1.11 or newer, you can alternatively provide a string | ||
describing a binning strategy, such as 'auto', 'sturges', 'fd', | ||
'doane', 'scott', 'rice', 'sturges' or 'sqrt', see | ||
`numpy.histogram`. | ||
|
||
Default is taken from the rcParam ``hist.bins``. | ||
The default is taken from :rc:`hist.bins`. | ||
|
||
range : tuple or None, optional | ||
The lower and upper range of the bins. Lower and upper outliers | ||
|
@@ -6094,7 +6094,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Default is ``None`` | ||
|
||
density : boolean, optional | ||
density : bool, optional | ||
If ``True``, the first element of the return tuple will | ||
be the counts normalized to form a probability density, i.e., | ||
the area (or integral) under the histogram will sum to 1. | ||
|
@@ -6118,7 +6118,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Default is ``None`` | ||
|
||
cumulative : boolean, optional | ||
cumulative : bool, optional | ||
If ``True``, then a histogram is computed where each bin gives the | ||
counts in that bin plus all bins for smaller values. The last bin | ||
gives the total number of datapoints. If *normed* or *density* | ||
|
@@ -6178,7 +6178,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Default is ``None`` | ||
|
||
log : boolean, optional | ||
log : bool, optional | ||
If ``True``, the histogram axis will be set to a log scale. If | ||
*log* is ``True`` and *x* is a 1D array, empty bins will be | ||
filtered out and only the non-empty ``(n, bins, patches)`` | ||
|
@@ -6192,14 +6192,14 @@ def hist(self, x, bins=None, range=None, density=None, weights=None, | |
|
||
Default is ``None`` | ||
|
||
label : string or None, optional | ||
label : str or None, optional | ||
String, or sequence of strings to match multiple datasets. Bar | ||
charts yield multiple patches per dataset, but only the first gets | ||
the label, so that the legend command will work as expected. | ||
|
||
default is ``None`` | ||
|
||
stacked : boolean, optional | ||
stacked : bool, optional | ||
If ``True``, multiple data are stacked on top of each other If | ||
``False`` multiple data are arranged side by side if histtype is | ||
'bar' or on top of each other if histtype is 'step' | ||
|
@@ -6553,10 +6553,10 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, | |
|
||
Parameters | ||
---------- | ||
x, y: array_like, shape (n, ) | ||
x, y : array_like, shape (n, ) | ||
Input values | ||
|
||
bins: [None | int | [int, int] | array_like | [array, array]] | ||
bins : None or int or [int, int] or array_like or [array, array] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (int, int) or (array, array)? (feels like tuples, nor arrays) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description came from |
||
|
||
The bin specification: | ||
|
||
|
@@ -6580,7 +6580,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, | |
xmax], [ymin, ymax]]. All values outside of this range will be | ||
considered outliers and not tallied in the histogram. | ||
|
||
normed : boolean, optional, default: False | ||
normed : bool, optional, default: False | ||
Normalize histogram. | ||
|
||
weights : array_like, shape (n, ), optional, default: None | ||
|
@@ -6610,7 +6610,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, | |
|
||
Other Parameters | ||
---------------- | ||
cmap : {Colormap, string}, optional | ||
cmap : Colormap or str, optional | ||
A :class:`matplotlib.colors.Colormap` instance. If not set, use rc | ||
settings. | ||
|
||
|
@@ -6619,7 +6619,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None, | |
scale luminance data to ``[0, 1]``. If not set, defaults to | ||
``Normalize()``. | ||
|
||
vmin/vmax : {None, scalar}, optional | ||
vmin/vmax : None or scalar, optional | ||
Arguments passed to the `Normalize` instance. | ||
|
||
alpha : ``0 <= scalar <= 1`` or ``None``, optional | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two lines earlier: space after comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.