Page
Library
Module
Module type
Parameter
Class
Class type
Source
PrintBox_ext_plotSourcePrintBox.t with plots of scatter graphs and line graphstype plot_spec = | Scatterplot of {points : (float * float) array;content : PrintBox.t;}Places the content box at each of the points coordinates.
| Scatterbag of {points : ((float * float) * PrintBox.t) array;}For each element of points, places the given box at the given coordinates.
| Line_plot of {points : float array;content : PrintBox.t;}Places the content box at vertical coordinates points, evenly horizontally spread.
| Boundary_map of {callback : (float * float) -> bool;content_true : PrintBox.t;content_false : PrintBox.t;}At evenly and densely spread coordinates across the graph, places either content_true or content_false, depending on the result of callback.
| Map of {callback : (float * float) -> PrintBox.t;}At evenly and densely spread coordinates across the graph, places the box returned by callback.
| Line_plot_adaptive of {callback : float -> float;cache : (float, float) Hashtbl.t;content : PrintBox.t;}At evenly and densely spread horizontal coordinates, places the content box at the vertical coordinate returned by callback for the horizontal coordinate of the placement position.
Specifies a layer of plotting to be rendered on a graph, where all layers share the same coordinate space. A coordinate pair has the horizontal position first.
type graph = {specs : plot_spec list;Earlier plots in the list take precedence: in case of overlap, their contents are on top. For HTML, we ensure that framed boxes and grids with bars are opaque.
*)x_label : string;Horizontal axis label.
*)y_label : string;Vertical axis label.
*)size : int * int;axes : bool;If false, only the graphing area is output (skipping the axes box).
*)prec : int;Precision for numerical labels on axes.
*)}A graph of plot layers, with a fixed rendering size but a coordinate window that adapts to the specified points.
A suggested configuration for plotting, with intended use: Plot {default_config with specs = ...; ...}. The default values are: { specs = []; x_label = "x"; y_label = "y"; size = 800, 800; axes = true; prec = 3 }
box graph is the same as PrintBox.extension ~key:"Plot" (Plot graph).
The conversion function for labeling axes. Defaults to sprintf "%.*g".