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

Skip to content

Commit 74e6e30

Browse files
authored
Merge pull request #9889 from dstansby/hist-normed
Deprecate 'normed' kwarg to hist
2 parents 07d2e94 + e247383 commit 74e6e30

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6051,6 +6051,9 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
60516051
60526052
Default is ``False``
60536053
6054+
normed : bool, optional
6055+
Deprecated; use the density keyword argument instead.
6056+
60546057
Returns
60556058
-------
60566059
n : array or list of arrays
@@ -6108,11 +6111,14 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
61086111
if histtype == 'barstacked' and not stacked:
61096112
stacked = True
61106113

6114+
if normed is not None:
6115+
warnings.warn("The 'normed' kwarg is deprecated, and has been "
6116+
"replaced by the 'density' kwarg.")
61116117
if density is not None and normed is not None:
61126118
raise ValueError("kwargs 'density' and 'normed' cannot be used "
61136119
"simultaneously. "
61146120
"Please only use 'density', since 'normed'"
6115-
"will be deprecated.")
6121+
"is deprecated.")
61166122

61176123
# basic input validation
61186124
input_empty = np.size(x) == 0

0 commit comments

Comments
 (0)