8000 Backport PR #9555 on branch v2.1.x by lumberbot-app[bot] · Pull Request #9561 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Backport PR #9555: MRG: expand docstring for hist
  • Loading branch information
NelleV authored and MeeseeksDev[bot] committed Oct 24, 2017
commit 039af0f82857f6abeb9631d8bc7d9e39c7c9cc27
20 changes: 16 additions & 4 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5943,10 +5943,22 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
Input values, this takes either a single array or a sequency of
arrays which are not required to be of the same length

bins : integer or array_like or 'auto', optional
If an integer is given, ``bins + 1`` bin edges are returned,
consistently with :func:`numpy.histogram` for numpy version >=
1.3.
bins : integer or sequence or 'auto', optional
If an integer is given, ``bins + 1`` bin edges are calculated and
returned, consistent with :func:`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
returned unmodified.

All but the last (righthand-most) bin is half-open. In other
words, if `bins` is::

[1, 2, 3, 4]

then the first bin is ``[1, 2)`` (including 1, but excluding 2) and
the second ``[2, 3)``. The last bin, however, is ``[3, 4]``, which
*includes* 4.

Unequally spaced bins are supported if *bins* is a sequence.

Expand Down
0