The OCaml bindings are now included in PLplot
As of PLplot version 5.9.1, released on December 15, 2008, the OCaml PLplot bindings are included in the official PLplot release.
As of July 20, 2008 the OCaml bindings are now included in the official PLplot Subversion source tree and can be built as along with the rest of PLplot.
This site will be maintained for reference as well as for any necessary updates required for the existing 5.8.0 and 5.9.0 OCaml binding releases. However, further development will be focused on the main PLplot source tree.
These are bindings to the PLplot library for the OCaml language.
Example session:
open Plplot;; (* Open the PLplot namespace *)
plsdev "xwin";; (* Use the X Windows driver *)
plinit ();; (* Initialize PLplot. This will open the plotting window. *)
plenv 0.0 1.0 0.0 1.0 1 0;;
(* Set the plot dimensions and aspect ratio, draw axes *)
pllab "x label" "y label" "Title";; (* Draw labels for axes and a title *)
let x = Array.init 100 (fun _ -> Random.float 1.0);;
let y = Array.init 100 (fun _ -> Random.float 1.0);;
(* Random (x,y) values to plot *)
plpoin x y 2;; (* Plot the random points using "+" symbols *)
plend ();; (* End the PLplot session and close the plotting window *)
(* This may require a right-click in the plotting window to complete *)This will produce the following plot:
See the PLplot documentation for more information on the OCaml bindings. Also, feel free to ask on the PLplot mailing list if you have any questions not covered by the documentation.