package gnuplot

  1. Overview
  2. Docs
type t

A wrapper for calling Gnuplot from OCaml.

val create : ?verbose:bool -> ?path:string -> unit -> t

create ?verbose ?path () creates a channel to a Gnuplot process with the executable given by path. If verbose is true then plotting commands print debug information on standard output.

val close : t -> unit

close t closes the channel to the Gnuplot process.

val set : ?output:Output.t -> ?title:string -> ?use_grid:bool -> ?fill:Filling.t -> ?labels:Labels.t -> t -> unit

set ?output ?title ?fill t sets parameters of the Gnuplot session.

val unset : ?fill:Filling.t -> ?labels:Labels.t -> t -> unit

unset ?fill ?labels t resets parameters of the Gnuplot session.

val plot : ?output:Output.t -> ?title:string -> ?use_grid:bool -> ?fill:Filling.t -> ?range:Range.t -> ?labels:Labels.t -> ?format:string -> t -> Series.t -> unit

plot t series plots a single data series. The parameters for filling, range, etc are optional.

val plot_many : ?output:Output.t -> ?title:string -> ?use_grid:bool -> ?fill:Filling.t -> ?range:Range.t -> ?labels:Labels.t -> ?format:string -> t -> Series.t list -> unit

plot_many t series creates a plot of multiple data series. The parameters for filling, range, etc are optional.

val plot_func : ?output:Output.t -> ?title:string -> ?use_grid:bool -> ?fill:Filling.t -> ?range:Range.t -> ?labels:Labels.t -> t -> string -> unit

plot_func t f draws a graph of the function f given as a string. The function f has to be specified in the Gnuplot format, eg `sin(x)`. The parameters for the filling, range, etc are optional.

OCaml

Innovation. Community. Security.