$ opam install gnuplot
$ make $ make install
NOTE: For a persistent X11 terminal add
set term x11 persist to your
.gnuplot file in your home directory.
The API-documentation of this distribution can be built with
It can also be found online.
This simple example
:::ocaml open Gnuplot let () = let gp = Gp.create () in Gp.plot_many gp ~range:(Range.XY (-10., 10., -1.5, 1.5)) [ Series.lines_func "sin(x)" ~title:"Plot a line" ~color:`Blue ; Series.points_func "cos(x)" ~title:"Plot points" ~color:`Green ]; Gp.close gp
generates the following plot:
For more examples please refer to the
examples-directory of this
distribution. You can build the examples with jbuilder, e.g.
$ jbuilder gbm_paths.exe
displays 10 simulated paths of geometric Brownian motion:
In case of bugs, feature requests and similar, please contact:
Oliver Gu firstname.lastname@example.org