1Changes for 0.82 2================ 3 4.. code-block:: text 5 6 - toolbar import change in GTKAgg, GTKCairo and WXAgg 7 8 - Added subplot config tool to GTK* backends -- note you must now 9 import the NavigationToolbar2 from your backend of choice rather 10 than from backend_gtk because it needs to know about the backend 11 specific canvas -- see examples/embedding_in_gtk2.py. Ditto for 12 wx backend -- see examples/embedding_in_wxagg.py 13 14 15 - hist bin change 16 17 Sean Richards notes there was a problem in the way we created 18 the binning for histogram, which made the last bin 19 underrepresented. From his post: 20 21 I see that hist uses the linspace function to create the bins 22 and then uses searchsorted to put the values in their correct 23 bin. That's all good but I am confused over the use of linspace 24 for the bin creation. I wouldn't have thought that it does 25 what is needed, to quote the docstring it creates a "Linear 26 spaced array from min to max". For it to work correctly 27 shouldn't the values in the bins array be the same bound for 28 each bin? (i.e. each value should be the lower bound of a 29 bin). To provide the correct bins for hist would it not be 30 something like 31 32 def bins(xmin, xmax, N): 33 if N==1: return xmax 34 dx = (xmax-xmin)/N # instead of N-1 35 return xmin + dx*arange(N) 36 37 38 This suggestion is implemented in 0.81. My test script with these 39 changes does not reveal any bias in the binning 40 41 from matplotlib.numerix.mlab import randn, rand, zeros, Float 42 from matplotlib.mlab import hist, mean 43 44 Nbins = 50 45 Ntests = 200 46 results = zeros((Ntests,Nbins), typecode=Float) 47 for i in range(Ntests): 48 print 'computing', i 49 x = rand(10000) 50 n, bins = hist(x, Nbins) 51 results[i] = n 52 print mean(results) 53