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

Skip to content

Commit 2a1958b

Browse files
story645meeseeksmachine
authored andcommitted
Backport PR #24164: Fix argument order in hist() docstring.
1 parent c519536 commit 2a1958b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6432,7 +6432,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
64326432
`~.stairs` to plot the distribution::
64336433
64346434
counts, bins = np.histogram(x)
6435-
plt.stairs(bins, counts)
6435+
plt.stairs(counts, bins)
64366436
64376437
Alternatively, plot pre-computed bins and counts using ``hist()`` by
64386438
treating each bin as a single point with a weight equal to its count::

0 commit comments

Comments
 (0)