Module Grace


module Grace: sig .. end
High-level interface to the Grace 2D plotting program.


Types for Controlling Plot Options


type layout_t = [ `Landscape | `Portrait | `Size of int * int ] 
Page layout options.

Use of `Landscape or `Portrait will choose appropriate dimensions for printing on the given orientation of letter-sized paper. `Size (w, h) may be used to select a specific dimension (in pixels).

type label_t = [ `Subtitle | `Title | `XAxis | `YAxis ] 
The different classes of labels that can be applied to a graph.
type 'a auto_option_t = [ `Auto | `Manual of 'a | `None ] 
The type of options with an 'automatic' capability.
type linestyle_t = int array auto_option_t 
The linestyle settings that can be applied to a plot of multiple datasets.

Use of `Manual a will cause the nth dataset to be rendered with linestyle a.(n). Use of `Auto will cause the datasets to be rendered using automatically-selected linestyles. Use of `None will cause no lines to be drawn for any dataset.

type symbol_t = int array auto_option_t 
The symbol settings that can be applied to a plot of multiple datasets.

Use of `Manual s will cause the nth dataset to be rendered using symbol s.(n). Use of `Auto will cause the datasets to be rendered using automatically-selected symbols. Use of `None will cause the datasets to be rendered using no symbols.

type grid_t = [ `Major | `Minor | `None ] 
The types of grids that can be drawn on a plot.

Use of `Major will cause gridlines to be drawn at major tickmarks. Use of `Minor will cause gridlines to be drawn at major and minor tickmarks. Use of `None will cause no gridlines to be drawn.

type tick_t = [ `Auto | `None | `Number of int * int | `Spacing of float * int | `Unchanged ] 
The methods of tickmark placement for an axis.

Use of `Unchanged will leave the current setting unchanged. `Auto will lay out tickmarks using a sensible default. `Spacing (sp, n) will place the major tickmarks sp apart, and the minor tickmarks will divide each major space by n. `Number (n1, n2) will place major tickmarks to approximately divide the range by n1, and again the minor tickmarks will divide each major space by n2. `None will remove all tickmarks from an axis.


Types for Controlling the Output


type driver_t = [ `EPS of string
| `JPEG of string
| `MF of string
| `MIF of string
| `PNG of string
| `PNM of string
| `PS of string
| `SVG of string ]
The various output device drivers. The string argument is the desired filename.

Classes for Creating Plots


class grace_view : ?debug:bool -> ?layout:layout_t -> unit -> object .. end
The fundamental Grace plotting class.

Helper Functions


val linspace : float -> float -> int -> float array
linspace min max n creates an array of size n whose elements range linearly between min and max, inclusive.
val logspace : float -> float -> int -> float array
logspace b1 b2 n creates an array of size n whose elements range logarithmically between 10.0 ** b1 and 10.0 ** b2, inclusive.