[Thread Prev][Thread Next][Index]

Re: Frequency Dist



Hi Scocks -

You are right, frequency_histogram.jnl appears to be
broken, or at least has not been updated since 1994.

However, thanks to Gabe Vecchi, I recently learned
how to make histograms. The following assumes that
your time series has a free z axis. If not, then you
will need to write out your time series to a dummy 
file, and read it back in as a plain time axis.
! ------------------------------------------------
! make a new z-axis that encompasses the range of the data
define axis/z=-10:10:1 zaz
define grid/z=zaz gaz

! choose histogram intervals (here .5)
let inter = if (abs(timeseries-z[gz=gaz]) le .5 then 1
let histo = inter[l=@sum]

! histo is now a count of the number of occurrences 
! in bins of +-.5 units of zaz
plot histo

! an obvious extension to plot percentages is
plot 100*histo/`histo[k=1:21@sum]`
! ------------------------------------------------
Regards .... Billy K



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement