Reputation: 149
I have an array of data, and I want to make a cumulative histogram with it in IDL. Is there an input that I can use on a HISTOGRAM, PLOTHIST, PHIST, or HISTO command that will do this for me? If there is, how do I use it?
Thank you!
Upvotes: 1
Views: 3179
Reputation: 2386
Try the CUMULATIVE
keyword to TOTAL
:
IDL> x = randomu(seed, 1000) * 100.
IDL> h = histogram(x, binsize=10)
IDL> ch = total(h, /cumulative, /preserve_type)
IDL> plot, ch, psym=10
Upvotes: 2