hi all,

i have a matrix of data and i would like to make a set of subplots,
each subplot with a histgram of one of the columns of the data. the
dataset is an Nx4 matrix containing only numbers between 0 and 1.

i plot it like this:

plt.subplot(2, 2, 1)
# histogram of first column
plt.hist(mydata[:, 0], 15)
plt.subplot(2, 2, 1)
# histogram of second column
plt.hist(mydata[:, 1], 15)
# etc...

since i want the subplots to be comparable, i'd like hist to use the
same bins for all subplots. how can i do this?

also, i would like to, instead of showing counts on the y-axis, show
the normalized probability of each bin. i looked into the "normed"
optional argument, but i don't think it achieves this. my attempt to
do this was:

plt.hist(mydata[:, 0], 15, normed=1)

but the y-axis is not set to be between 0 and 1.

any ideas on how to do this would be greatly appreciated. thanks.

plt.hist(mydata[:, 0]

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to