Skip to content

Commit d1c9bb4

Browse files
committed
Upate comments in hist to be more descriptive
1 parent 2ca68c6 commit d1c9bb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/axes.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8192,15 +8192,15 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
81928192
self.set_yscale('log')
81938193
logbase = self.yaxis._scale.base
81948194

8195-
# setting a minimum of 0 results in problems for log plots
8195+
# Setting a minimum of 0 results in problems for log plots
81968196
if normed:
8197-
# for normed data, set to 0.1 * minimum data value
8198-
# (gives 1 full dex for the lowest filled bin)
8197+
# For normed data, set to log base * minimum data value
8198+
# (gives 1 full tick-label unit for the lowest filled bin)
81998199
ndata = np.array(n)
82008200
minimum = (np.min(ndata[ndata>0])) / logbase
82018201
else:
8202-
# for non-normed data, set the min to 0.1, again so that
8203-
# there is 1 full dex for the lowest bin
8202+
# For non-normed data, set the min to log base, again so that
8203+
# there is 1 full tick-label unit for the lowest bin
82048204
minimum = 1.0 / logbase
82058205

82068206
y[0], y[-1] = minimum, minimum

0 commit comments

Comments
 (0)