package prbnmcn-gnuplot
Declarative generation of gnuplot scripts
Install
Dune Dependency
Authors
Maintainers
Sources
0.0.1.tar.gz
md5=b3a7f1f921c5630d62b853934bfcc5cd
sha512=8b7cc1ef22a7eafeabbbba0c098d7a11f7288b4641b59359e3e8a99a317186f2797f3d3c05db2e2dea58447bf5273438679d8c0926b53bab6533c3b8cd9604e9
README.md.html
prbnmcn-gnuplot
This library provides an relatively basic overlay over Gnuplot. It provides facilities for performing scatterplots, line plots and histograms.
Look no further for the documentation.
Note that some features exposed by the library do not work with Gnuplot versions below 5.4.
Here's a tiny example, plotting a sine function and displaying it on the Qt backend.
let discretize f =
Array.init 100 (fun i ->
let x = float_of_int i *. 0.1 in
Plot.r2 x (f x))
let sin =
let open Plot in
Line.line_2d
~points:(Data.of_array (discretize sin))
~style:
Style.(default |> set_color Color.red |> set_point ~ptyp:Pointtype.box)
~with_points:true
~legend:"sin"
()
let () =
let target = Plot.qt () in
Plot.(run
~target
~plot:(plot2 ~xaxis:"x" ~yaxis:"y" ~title:"sin" [sin])
exec)
This produces something like this.
An alternative to this library is ocaml-gnuplot.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>