I noticed a small problem in axes.py; when setting weights with a
histogram, a variable 'w' is accessed before it's assigned. It looks
like this is a typo where 'w' should instead be 'weights'. The patch
is copied below and attached.
Cheers,
Jeff
Jeff Klukas, Research Assistant, Physics
University of Wisconsin -- Madison
jeff.klukas@...830... | jeffyklukas@...831... | jeffklukas@...832...
http://www.hep.wisc.edu/~jklukas/
Index: lib/matplotlib/axes.py
klukashist.diff (514 Bytes)
···
===================================================================
--- lib/matplotlib/axes.py (revision 8316)
+++ lib/matplotlib/axes.py (working copy)
@@ -7364,7 +7364,7 @@
raise ValueError("color kwarg must have one color per dataset")
if weights is not None:
- if isinstance(w, np.ndarray):
+ if isinstance(weights, np.ndarray):
w = np.array(weights)
if w.ndim == 2:
w = w.T