1

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!

Joe
  • 2,547
  • 1
  • 18
  • 27
user1558576
  • 149
  • 2
  • 5

1 Answers1

2

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
mgalloy
  • 2,356
  • 1
  • 12
  • 10