1
(* $Id: x05.ml 10463 2009-09-23 20:56:58Z hezekiahcarty $
8
let pi = atan 1.0 *. 4.0
12
(*--------------------------------------------------------------------------*\
13
* Draws a histogram from sample data.
14
\*--------------------------------------------------------------------------*)
17
(* Parse and process command line arguments *)
18
plparseopts Sys.argv [PL_PARSE_FULL];
20
(* Initialize plplot *)
23
(* Fill up data points *)
25
let delta = 2.0 *. pi /. float_of_int npts in
26
let data = Array.init npts (fun i -> sin (float_of_int i *. delta)) in
29
plhist data (-1.1) 1.1 44 [PL_HIST_DEFAULT];
31
pllab "#frValue" "#frFrequency"
32
"#frPLplot Example 5 - Probability function of Oscillator";