PDA

View Full Version : Histograms in IDL


taylrl3
Jun18-10, 12:45 PM
Hi,

I am currently having an absolute nightmare trying to use the histogram command in IDL. I almost have it as I want, I just want it to show my units on the x-axis rather than the number of bins. I can't find anything that explains how this works on the net it seems no one really understands it at all. Hopefully someone here can help me. This is how I am plotting it at the moment:

plot, histogram(Galaxydiffs, bin=((max-min)/nbins)), xtitle='X/h!u-1!nMpc', psym=10

Galaxydiffs is an array with the data I want in the histogram.
nbins is the number of bins

Currently the x-axis is the number of bins. I want it to show the distances corresponding to each bin.

Any help would be most appreciated as this is driving me crazy

Thanks
Taylrl2