Page
Library
Module
Module type
Parameter
Class
Class type
Source
Plplot.PlotSourceTHIS API IS NOT FIXED AND MAY CHANGE BEFORE THE 5.10.0 RELEASE
The different sides of a (2D) plot. These values are used to represent, e.g., offsets along axes and text placement.
type axis_options_t = [ | `axis| `frame0| `frame1| `time| `fixed_point| `major_grid| `minor_grid| `invert_ticks| `log| `unconventional_label| `label| `custom_label| `minor_ticks| `minor_tick_count of int| `major_ticks| `major_tick_spacing of float| `vertical_label ]These are the available options for drawing plot axes. These values map to individual letters provided to Plplot.plbox and similar functions.
A plot stream.
type color_t = [ | `white| `red| `yellow| `green| `gray| `blue| `light_blue| `purple| `pink| `black| `brown| `index of int ]Colors from the indexed color map (color map 0), from the cmapo_alternate.pal file! Note that these will NOT match up with colors from the default color palette!
Type signature for coordinate transform functions
The different available plot device families. This is not a complete representation of all of the available devices provided by PLplot.
type plot_device_t = [ | `pdf of plot_device_family_t| `png of plot_device_family_t| `ps of plot_device_family_t| `svg of plot_device_family_t| `window of plot_device_family_t| `promptAsk for the correct device to use at run-time
*)| `stream of intPre-defined plot streams
*)| `other_device of string ]Plot devices. The constructor argument allows one to define which device family is used.
PLplot plotting devices otherwise not available from this list
Type of scaling to use for plot axes, as in Plplot.plenv.
A color palette, usually loaded from disk
type line_style_t = [ | `solid| `line1| `line2| `line3| `line4| `line5| `line6| `line7| `line8| `custom of (int * int) list ]Line plotting styles/patterns.
A custom line style, with each (mark, space) pair defining the length of one segment and gap in the line drawing pattern.
The default list of axis rendering options, used for all plots generated with init if no custom options are provided.
Convert color_t values to r, g, b integer values, each ranging in value from 0 - 255.
A recommended/standard file name extension, given a particular plot device.
Make a new stream_t, possibly using an existing plot stream index. If no stream argument is provided then a new plot stream is created.
val start_page :
?stream:stream_t ->
(float * float) ->
(float * float) ->
plot_scaling_t ->
unitstart_page ?stream (x0, y0) (x1, y1) scaling starts a new plot page with the given dimensions and scaling.
val next_page :
?stream:stream_t ->
(float * float) ->
(float * float) ->
plot_scaling_t ->
unitAn alias for start_page.
val make :
?stream:stream_t ->
?filename:string ->
?size:(int * int) ->
?pre:(unit -> unit) ->
plot_device_t ->
stream_tCreate a new plot instance. See init for a description of the parameters.
val init :
?filename:string ->
?size:(int * int) ->
?pages:(int * int) ->
?pre:(unit -> unit) ->
(float * float) ->
(float * float) ->
plot_scaling_t ->
plot_device_t ->
stream_tinit ?filename ?size ?pages (x0, y0) (x1, y1) scale device - Start a new plot stream for a 2D plot with plot axis extents given by (x0, y0) to (x1, y1). A call to init is roughly equivalent to calling make and then start_page.
with_stream ?stream f performs f with stream as the active plot stream. If stream is not provided then the currently active plot stream is left active. Once f is complete, the previously active plot stream is restored.
make_stream_active stream makes stream in to the currently active plot stream for The standard PLplot API calls or any function which is not provided with an explicit stream argument.
set_color ?stream color sets the current active plot color to color.
val set_color_scale :
?stream:stream_t ->
?pos:float array ->
?alt_hue_path:bool array ->
color_t array ->
unitset_color_scale ?stream ?pos ?alt_hue_path colors sets the continuous color map (color map 1) to a scale determined by interpolating between colors. pos can be used to specify where in the color scale (0.0 - 1.0) the a color interpolation point should fall. pos defaults to even spacing. alt_hue_path can be used to specify that a given segment should be interpolated using the alternative hue path which always includes the hue=0 point. Plplot.plscmap1l is used internally to set the color scale.
PLplot has two color palettes - indexed (color map 0) and continuous (color map 1). These functions can be used with load_palette to set custom indexed and continuous color palettes.
continuous_palette ?interpolate filename - If interpolate is true (the default) then a smooth palette is generated using the color definitions in the palette file filename. Otherwise, the colors are considered to be discrete, giving a segmented palette.
load_palette ?stream palette loads either indexed or continuous color palette information from a file on disk.
val arc :
?fill:bool ->
color_t ->
float ->
float ->
float ->
float ->
float ->
float ->
float ->
plot_tarc ?fill color x y a b angle0 angle1 rotate
val axes :
?color:color_t ->
?style:line_style_t ->
?width:float ->
?labelfunc:([ `x | `y | `z ] -> float -> string) ->
axis_options_t list ->
axis_options_t list ->
plot_taxes ?color ?style ?width xopt yopt
default_axes is equivalent to axes default_axis_options default_axis_options
circle ?fill color x y r
contours color tranform_func contours data
val image :
?range:(float * float) ->
(float * float) ->
(float * float) ->
float array array ->
plot_timage ?range (x0, y0) (x1, y1) data
val imagefr :
?range:(float * float) ->
scale:(float * float) ->
(float * float) ->
(float * float) ->
float array array ->
plot_timagefr ?range ~scale (x0, y0) (x1, y1) data
val join :
?style:line_style_t ->
?width:float ->
color_t ->
(float * float) ->
(float * float) ->
plot_tjoin ?style color (x0, y0) (x1, y1)
label ?color x_label y_label title adds axis labels and a title.
val lines :
?label:string ->
?style:line_style_t ->
?width:float ->
color_t ->
float array ->
float array ->
plot_tlines ?label ?style color xs ys
map ?sw ?ne color outline_type
val points :
?label:string ->
?symbol:string ->
?scale:float ->
color_t ->
float array ->
float array ->
plot_tpoints ?label ?symbol ?scale color xs ys
polygon ?fill color xs ys
rectangle ?fill color (x0, y0) (x1, y1)
val shades :
?fill_width:float ->
?contour:(color_t * float) ->
?rect:bool ->
(float * float) ->
(float * float) ->
float array ->
float array array ->
plot_tshades ?fill_width ?contour ?rect (x0, y0) (x1, y1) contours data
val text :
?dx:float ->
?dy:float ->
?just:float ->
color_t ->
float ->
float ->
string ->
plot_ttext ?dx ?dy ?just color x y string writes the text string inside the plot window, at an optional angle defined by the offsets dx and dy.
val text_outside :
?just:float ->
?perp:bool ->
color_t ->
float tagged_side_t ->
float ->
string ->
plot_ttext_outside ?just ?perp color side offset string writes text outside of the plot window, along side, displaced from the axis by offset * character height.
val func :
?symbol:string ->
?step:float ->
color_t ->
(float -> float) ->
(float * float) ->
plot_tfunc ?symbol ?step color f (min, max) plots the function f from x = min to x = max. step can be used to tighten or coarsen the sampling of plot points.
transform f sets the universal coordinate transformation function.
clear_transform clears any currently defined universal coordinate transform function.
pltr f sets the coordinate transformation function used by imagefr and other functions affected by Plplot.plset_pltr.
clear_pltr clears any currently defined function-specific pltr transform function.
custom f will call f () when the plot element is used. This function can be used to create customized plot elements for use with plot.
list l makes a plot element from a list of plot elements, allowing, for example, a plot to be created piece-by-piece before being rendered.
maybe m_p will plot the contents of m_p. If m_p is None then this is effectively a no-op.
Character height in world coordinate units
Positioning within viewport or subpage
val viewport_pos :
?side1:side_t ->
?side2:side_t ->
?inside:bool ->
float ->
float ->
position_tPosition relative to the plot viewport
val subpage_pos :
?side1:side_t ->
?side2:side_t ->
?inside:bool ->
float ->
float ->
position_tPosition relative to the plot subpage
Legend entry
Layout of elements
Empty legend entry
val box_legend :
?pattern:int ->
?scale:float ->
?line_width:float ->
?label_color:color_t ->
label:string ->
color_t ->
legend_entry_tColor-filled box legend entry
val line_legend :
?style:int ->
?width:float ->
?label_color:color_t ->
label:string ->
color_t ->
legend_entry_tLine legend entry
val symbol_legend :
?scale:float ->
?number:int ->
?label_color:color_t ->
label:string ->
color_t ->
string ->
legend_entry_tSymbol/point legend entry
val legend :
?pos:position_t ->
?plot_width:float ->
?bg:color_t ->
?bb:(color_t * line_style_t) ->
?layout:(int * int) layout_t ->
?color:color_t ->
?text_offset:float ->
?text_scale:float ->
?text_spacing:float ->
?text_justification:float ->
?text_left:bool ->
legend_entry_t list list ->
plot_tlegend entries
Colorbar axis definitions
Available colorbar kinds
colorbar_axis ?axis values creates a colorbar_axis_t with the given axis options and range values.
gradient_colorbar ?axis [|min; max|] from min to max
image_colorbar ?axis [|min; max|] from min to max
val shade_colorbar :
?custom:bool ->
?axis:axis_options_t list ->
float array ->
colorbar_kind_tshade_colorbar ?custom ?axis contours defines a shaded contour colorbar with axis labels at even spacings (custom = false) or at the locations of the values in contours (custom = true - the default).
Default options used for a colorbar axis
val colorbar :
?pos:position_t ->
?bg:color_t ->
?bb:(color_t * line_style_t) ->
?cap:(float option * float option) ->
?contour:(color_t * float) ->
?orient:(float * float) tagged_side_t ->
?axis:colorbar_axis_t list ->
?label:string tagged_side_t list ->
?color:color_t ->
?scale:float ->
colorbar_kind_t ->
plot_tcolorbar colorbar_kind
Draw the plot axes on the current plot page
end_stream ?stream () ends stream. This or finish should be called once all plotting is complete.