I have an array of absolute magnitudes Hlist and would like to
plot a cumulative histogram. Is there an easy way to do this
in matplotlib?
Cheers
Tommy
I have an array of absolute magnitudes Hlist and would like to
plot a cumulative histogram. Is there an easy way to do this
in matplotlib?
Cheers
Tommy
I don’t know about easy, but here is
a start:
normHist, lower_edges = numpy.histogram(Hlist,
bins=100, normed=True)
binWidth = lower_edges[-1]/len(lower_edges)
cumHist = normHist.cumsum()*binWidth
pylab.plot(lower_edges+0.5*binWidth,
cumHist)
Needs some tweaking, no doubt.
Tommy Grav <tgrav@…935…>
Sent by: matplotlib-users-bounces@lists.sourceforge.net
20/06/2007 01:59 AM
To
matplotlib-users@lists.sourceforge.net
cc
Subject
[Matplotlib-users] Cumulative histogram
`I have an array of absolute magnitudes Hlist and would
like to
plot a cumulative histogram. Is there an easy way to do this
in matplotlib?
Cheers
Tommy
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
`
UNITED GROUP
This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access.
If you have received this email in error, please notify United Group immediately by email to the sender’s email address and delete this document.
some tweaking…
binWidth = lower_edges[-1]/(len(lower_edges)-1)
brett.mcsweeney@…1537…
Sent by: matplotlib-users-bounces@lists.sourceforge.net
20/06/2007 09:14 AM
To
Tommy Grav <tgrav@…935…>
cc
matplotlib-users-bounces@lists.sourceforge.net,
matplotlib-users@lists.sourceforge.net
Subject
Re: [Matplotlib-users] Cumulative histogram
I don’t know about easy, but here is a start:
normHist, lower_edges = numpy.histogram(Hlist, bins=100, normed=True)
binWidth = lower_edges[-1]/len(lower_edges)
cumHist = normHist.cumsum()*binWidth
pylab.plot(lower_edges+0.5*binWidth, cumHist)
Needs some tweaking, no doubt.
Tommy Grav <tgrav@…935…>
Sent by: matplotlib-users-bounces@lists.sourceforge.net
20/06/2007 01:59 AM
To
matplotlib-users@lists.sourceforge.net
cc
Subject
[Matplotlib-users] Cumulative histogram
`
I have an array of absolute magnitudes Hlist and would like to
plot a cumulative histogram. Is there an easy way to do this
in matplotlib?
Cheers
Tommy
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________`
UNITED GROUP
This email message is the property of United Group. The information in
this email is confidential and may be legally privileged. It is intended
solely for the addressee. Access to this email by anyone else is unauthorised.
If you are not the intended recipient, you may not disclose, copy or distribute
this email, nor take or omit to take any action in reliance on it. United
Group accepts no liability for any damage caused by this email or any attachments
due to viruses, interference, interception, corruption or unauthorised
access.
If you have received this email in error, please notify United Group immediately
by email to the sender’s email address and delete this document.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________`-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
`
UNITED GROUP
This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access.
If you have received this email in error, please notify United Group immediately by email to the sender’s email address and delete this document.