8000 Fix bug in setting y-axis minimum in histograms with weights and log … · matplotlib/matplotlib@d5b624f · GitHub
[go: up one dir, main page]

Skip to content

Commit d5b624f

Browse files
author
Nic Eggert
committed
Fix bug in setting y-axis minimum in histograms with weights and log y-axis
1 parent 687286a commit d5b624f

File tree

5 files changed

+2419
-1533
lines changed

5 files changed

+2419
-1533
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5636,7 +5636,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
56365636
logbase = self.yaxis._scale.base
56375637

56385638
# Setting a minimum of 0 results in problems for log plots
5639-
if normed:
5639+
if normed or weights is not None:
56405640
# For normed data, set to log base * minimum data value
56415641
# (gives 1 full tick-label unit for the lowest filled bin)
56425642
ndata = np.array(n)
Binary file not shown.
Loading

0 commit comments

Comments
 (0)
0