nbv4 wrote:
> The histogram example in the matpolotlib gallery is just what I want, except
> instead of "probility" shown on the Y-axis, I want the number of items that
> fall into each bin to be plotted. How do I do this? Here is my code:
> 
>         import numpy as np
>         import matplotlib
>         matplotlib.use('Agg')
>         import matplotlib.pyplot as plt
> 
>         fig = plt.figure()
>         ax = fig.add_subplot(111)
> 
>         x = self.data ## a list, such as [12.43, 34.24, 35.56, 465.3547, ]
>         ax.hist(x, 60, normed=1, facecolor='green', alpha=0.75)

Leave out the "normed" kwarg, or set it to False (the default).

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hist

> 
>         ax.set_xlabel('Totals')
>         ax.set_ylabel('Number of Users'))
>         ax.set_xlim(0, 2000)
>         ax.set_ylim(0, 0.003)
>         ax.grid(True)


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to