package prbnmcn-gnuplot

  1. Overview
  2. Docs

Preparing line plots.

val line_2d : points:r2 Data.t -> ?style:Style.t -> ?legend:string -> ?with_points:bool -> ?error_bars:r2 Data.t -> unit -> r2 spec

line_2d ~points ?style ?legend ?with_points ?error_bars () creates a 2d line plot.

  • The optional argument ?style defaults to Style.default
  • The optional argument ?legend defaults to "".
  • The optional argument ?with_points set to true will display additional symbols (specified through the style) at the positions corresponding to points. This argument is ignored if ?error_bars is passed.
  • The optional argument ?error_bars, if present, is a sequence of r2 elements such that each element (y1, y2) is displayed as a vertical error bar. The error bar associated to the element (x, y) then correspond to the segment starting at (x, y + y1) and ending at (x, y - y2).
  • raises Invalid_argument

    if the length of error_bars, if present, is not equal to that of points.

val line_3d : points:r3 Data.t -> ?style:Style.t -> ?legend:string -> ?with_points:bool -> unit -> r3 spec

line_3d ~points ~style ~legend creates a 3d line plot. See line_2d for the meaning of the other options.

val line : points:r1 Data.t -> ?style:Style.t -> ?legend:string -> ?with_points:bool -> ?error_bars:r2 Data.t -> unit -> r2 spec

line ~points ?style ?legend ?with_points ?error_bars () creates a 2d line plot. points is a sequence of y coordinates y1, y2, y3 ..., which is interpreted as the sequence (1, y1), (2, y2), (3, y3) and then passed to line_2d. See the documentation of line_2d for the meaning of the other options.