package plplot

  1. Overview
  2. Docs

PLplot - A library for creating scientific plots

Note: The API for the Plot and Quick_plot modules is not yet fixed and may change between now and the 5.10.0 PLplot release.

The standard PLplot API is not expected to change.

module Plot : sig ... end
module Quick_plot : sig ... end

The standard PLplot API

See the main PLplot documentation for the description and documentation of these functions.

type plplot_axis_type =
  1. | PL_X_AXIS
  2. | PL_Y_AXIS
  3. | PL_Z_AXIS
and plplot3d_style_enum =
  1. | PL_DIFFUSE
  2. | PL_DRAW_LINEX
  3. | PL_DRAW_LINEY
  4. | PL_DRAW_LINEXY
  5. | PL_MAG_COLOR
  6. | PL_BASE_CONT
  7. | PL_TOP_CONT
  8. | PL_SURF_CONT
  9. | PL_DRAW_SIDES
  10. | PL_FACETED
  11. | PL_MESH
and plplot3d_style = plplot3d_style_enum list
and plplot_bin_enum =
  1. | PL_BIN_DEFAULT
  2. | PL_BIN_CENTRED
  3. | PL_BIN_NOEXPAND
  4. | PL_BIN_NOEMPTY
and plplot_bin_style = plplot_bin_enum list
and plplot_hist_enum =
  1. | PL_HIST_DEFAULT
  2. | PL_HIST_NOSCALING
  3. | PL_HIST_IGNORE_OUTLIERS
  4. | PL_HIST_NOEXPAND
  5. | PL_HIST_NOEMPTY
and plplot_hist_style = plplot_hist_enum list
and plplot_run_level_enum =
  1. | PL_UNINITIALIZED
  2. | PL_INITIALIZED
  3. | PL_VIEWPORT_DEFINED
  4. | PL_WORLD_COORDINATES_DEFINED
and plplot_run_level = plplot_run_level_enum
and plplot_position_enum =
  1. | PL_POSITION_LEFT
  2. | PL_POSITION_RIGHT
  3. | PL_POSITION_TOP
  4. | PL_POSITION_BOTTOM
  5. | PL_POSITION_INSIDE
  6. | PL_POSITION_OUTSIDE
  7. | PL_POSITION_VIEWPORT
  8. | PL_POSITION_SUBPAGE
and plplot_position_opt = plplot_position_enum list
and plplot_legend_enum =
  1. | PL_LEGEND_NONE
  2. | PL_LEGEND_COLOR_BOX
  3. | PL_LEGEND_LINE
  4. | PL_LEGEND_SYMBOL
  5. | PL_LEGEND_TEXT_LEFT
  6. | PL_LEGEND_BACKGROUND
  7. | PL_LEGEND_BOUNDING_BOX
  8. | PL_LEGEND_ROW_MAJOR
and plplot_legend_opt = plplot_legend_enum list
and plplot_colorbar_enum =
  1. | PL_COLORBAR_LABEL_LEFT
  2. | PL_COLORBAR_LABEL_RIGHT
  3. | PL_COLORBAR_LABEL_TOP
  4. | PL_COLORBAR_LABEL_BOTTOM
  5. | PL_COLORBAR_IMAGE
  6. | PL_COLORBAR_SHADE
  7. | PL_COLORBAR_GRADIENT
  8. | PL_COLORBAR_CAP_NONE
  9. | PL_COLORBAR_CAP_LOW
  10. | PL_COLORBAR_CAP_HIGH
  11. | PL_COLORBAR_SHADE_LABEL
  12. | PL_COLORBAR_ORIENT_RIGHT
  13. | PL_COLORBAR_ORIENT_TOP
  14. | PL_COLORBAR_ORIENT_LEFT
  15. | PL_COLORBAR_ORIENT_BOTTOM
  16. | PL_COLORBAR_BACKGROUND
  17. | PL_COLORBAR_BOUNDING_BOX
and plplot_colorbar_opt = plplot_colorbar_enum list
and plplot_fci_family_enum =
  1. | PL_FCI_FAMILY_UNCHANGED
  2. | PL_FCI_SANS
  3. | PL_FCI_SERIF
  4. | PL_FCI_MONO
  5. | PL_FCI_SCRIPT
  6. | PL_FCI_SYMBOL
and plplot_fci_style_enum =
  1. | PL_FCI_STYLE_UNCHANGED
  2. | PL_FCI_UPRIGHT
  3. | PL_FCI_ITALIC
  4. | PL_FCI_OBLIQUE
and plplot_fci_weight_enum =
  1. | PL_FCI_WEIGHT_UNCHANGED
  2. | PL_FCI_MEDIUM
  3. | PL_FCI_BOLD
and plplot_draw_mode_enum =
  1. | PL_DRAWMODE_UNKNOWN
  2. | PL_DRAWMODE_DEFAULT
  3. | PL_DRAWMODE_REPLACE
  4. | PL_DRAWMODE_XOR
val pl_setcontlabelformat : int -> int -> unit
val pl_setcontlabelparam : float -> float -> float -> int -> unit
val pladv : int -> unit
val plarc : float -> float -> float -> float -> float -> float -> float -> bool -> unit
val plaxes : float -> float -> string -> float -> int -> string -> float -> int -> unit
val plbin : float array -> float array -> plplot_bin_style -> unit
val plbtime : float -> int * int * int * int * int * float
val plbop : unit -> unit
val plbox : string -> float -> int -> string -> float -> int -> unit
val plbox3 : string -> string -> float -> int -> string -> string -> float -> int -> string -> string -> float -> int -> unit
val plcalc_world : float -> float -> float * float * int
val plclear : unit -> unit
val plcol0 : int -> unit
val plcol1 : float -> unit
val plconfigtime : float -> float -> float -> int -> bool -> int -> int -> int -> int -> int -> float -> unit
val plcpstrm : int -> bool -> unit
val plctime : int -> int -> int -> int -> int -> float -> float
val plend : unit -> unit
val plend1 : unit -> unit
val plenv : float -> float -> float -> float -> int -> int -> unit
val plenv0 : float -> float -> float -> float -> int -> int -> unit
val pleop : unit -> unit
val plerrx : float array -> float array -> float array -> unit
val plerry : float array -> float array -> float array -> unit
val plfamadv : unit -> unit
val plfill : float array -> float array -> unit
val plfill3 : float array -> float array -> float array -> unit
val plflush : unit -> unit
val plfont : int -> unit
val plfontld : int -> unit
val plgchr : unit -> float * float
val plgcmap1_range : unit -> float * float
val plgcol0 : int -> int * int * int
val plgcol0a : int -> int * int * int * float
val plgcolbg : unit -> int * int * int
val plgcolbga : unit -> int * int * int * float
val plgcompression : unit -> int
val plgdev : unit -> string
val plgdidev : unit -> float * float * float * float
val plgdiori : unit -> float
val plgdiplt : unit -> float * float * float * float
val plgdrawmode : unit -> plplot_draw_mode_enum
val plgfci : unit -> int64
val plgfam : unit -> int * int * int
val plgfnam : unit -> string
val plgfont : unit -> int * int * int
val plglevel : unit -> plplot_run_level
val plgpage : unit -> float * float * int * int * int * int
val plgra : unit -> unit
val plgradient : float array -> float array -> float -> unit
val plgspa : unit -> float * float * float * float
val plgstrm : unit -> int
val plgver : unit -> string
val plgvpd : unit -> float * float * float * float
val plgvpw : unit -> float * float * float * float
val plgxax : unit -> int * int
val plgyax : unit -> int * int
val plgzax : unit -> int * int
val plhist : float array -> float -> float -> int -> plplot_hist_style -> unit
val plhlsrgb : float -> float -> float -> float * float * float
val plinit : unit -> unit
val pljoin : float -> float -> float -> float -> unit
val pllab : string -> string -> string -> unit
val plcolorbar : plplot_colorbar_opt -> plplot_position_opt -> float -> float -> float -> float -> int -> int -> int -> float -> float -> int -> float -> plplot_colorbar_opt array -> string array -> string array -> float array -> int array -> float array array -> float * float
val pllegend : plplot_legend_opt -> plplot_position_opt -> float -> float -> float -> int -> int -> int -> int -> int -> plplot_legend_opt array -> float -> float -> float -> float -> int array -> string array -> int array -> int array -> float array -> float array -> int array -> int array -> float array -> int array -> float array -> int array -> string array -> float * float
val pllightsource : float -> float -> float -> unit
val plline : float array -> float array -> unit
val plline3 : float array -> float array -> float array -> unit
val pllsty : int -> unit
val plmesh : float array -> float array -> float array array -> plplot3d_style -> unit
val plmeshc : float array -> float array -> float array array -> plplot3d_style -> float array -> unit
val plmkstrm : unit -> int
val plmtex : string -> float -> float -> float -> string -> unit
val plmtex3 : string -> float -> float -> float -> string -> unit
val plot3d : float array -> float array -> float array array -> plplot3d_style -> bool -> unit
val plot3dc : float array -> float array -> float array array -> plplot3d_style -> float array -> unit
val plpat : int array -> int array -> unit
val plpath : int -> float -> float -> float -> float -> unit
val plpoin : float array -> float array -> int -> unit
val plpoin3 : float array -> float array -> float array -> int -> unit
val plprec : int -> int -> unit
val plpsty : int -> unit
val plptex : float -> float -> float -> float -> float -> string -> unit
val plptex3 : float -> float -> float -> float -> float -> float -> float -> float -> float -> float -> string -> unit
val plrandd : unit -> float
val plreplot : unit -> unit
val plrgbhls : float -> float -> float -> float * float * float
val plschr : float -> float -> unit
val plscmap0 : int array -> int array -> int array -> unit
val plscmap0a : int array -> int array -> int array -> float array -> unit
val plscmap0n : int -> unit
val plscmap1 : int array -> int array -> int array -> unit
val plscmap1a : int array -> int array -> int array -> float array -> unit
val plscmap1l : bool -> float array -> float array -> float array -> float array -> bool array option -> unit
val plscmap1la : bool -> float array -> float array -> float array -> float array -> float array -> bool array option -> unit
val plscmap1n : int -> unit
val plscmap1_range : float -> float -> unit
val plscol0 : int -> int -> int -> int -> unit
val plscol0a : int -> int -> int -> int -> float -> unit
val plscolbg : int -> int -> int -> unit
val plscolbga : int -> int -> int -> float -> unit
val plscolor : int -> unit
val plscompression : int -> unit
val plsdev : string -> unit
val plsdidev : float -> float -> float -> float -> unit
val plsdimap : int -> int -> int -> int -> float -> float -> unit
val plsdiori : float -> unit
val plsdiplt : float -> float -> float -> float -> unit
val plsdiplz : float -> float -> float -> float -> unit
val plseed : int64 -> unit
val plsesc : char -> unit
val plsfam : int -> int -> int -> unit
val plsfci : int64 -> unit
val plsfnam : string -> unit
val plsmaj : float -> float -> unit
val plsmin : float -> float -> unit
val plsdrawmode : plplot_draw_mode_enum -> unit
val plsori : int -> unit
val plspage : float -> float -> int -> int -> int -> int -> unit
val plspal0 : string -> unit
val plspal1 : string -> bool -> unit
val plspause : bool -> unit
val plsstrm : int -> unit
val plssub : int -> int -> unit
val plssym : float -> float -> unit
val plstar : int -> int -> unit
val plstart : string -> int -> int -> unit
val plstring : float array -> float array -> string -> unit
val plstring3 : float array -> float array -> float array -> string -> unit
val plstripa : int -> int -> float -> float -> unit
val plstripd : int -> unit
val plimage : float array array -> float -> float -> float -> float -> float -> float -> float -> float -> float -> float -> unit
val plstyl : int array -> int array -> unit
val plsurf3d : float array -> float array -> float array array -> plplot3d_style -> float array -> unit
val plsvect : float array -> float array -> bool -> unit
val plsvpa : float -> float -> float -> float -> unit
val plsxax : int -> int -> unit
val plsxwin : int -> unit
val plsyax : int -> int -> unit
val plsym : float array -> float array -> int -> unit
val plszax : int -> int -> unit
val pltext : unit -> unit
val pltimefmt : string -> unit
val plvasp : float -> unit
val plvpas : float -> float -> float -> float -> float -> unit
val plvpor : float -> float -> float -> float -> unit
val plvsta : unit -> unit
val plw3d : float -> float -> float -> float -> float -> float -> float -> float -> float -> float -> float -> unit
val plwidth : float -> unit
val plwind : float -> float -> float -> float -> unit
val plxormod : bool -> bool
val plsetopt : string -> string -> unit
val plMinMax2dGrid : float array array -> float * float
val plcont : float array array -> int -> int -> int -> int -> float array -> unit
val plshade : float array array -> float -> float -> float -> float -> float -> float -> int -> float -> float -> int -> float -> int -> float -> bool -> unit
val plshades : float array array -> float -> float -> float -> float -> float array -> float -> int -> float -> bool -> unit
val plimagefr : float array array -> float -> float -> float -> float -> float -> float -> float -> float -> unit
val plvect : float array array -> float array array -> float -> unit
val plmap : string -> float -> float -> float -> float -> unit
val plmeridians : float -> float -> float -> float -> float -> float -> unit
val plpoly3 : float array -> float array -> float array -> bool array -> bool -> unit
val pltr0 : float -> float -> float * float
val plsvect_reset : unit -> unit
val plg_current_col0 : unit -> int
val plg_current_col1 : unit -> float
val plgwidth : unit -> float
val plgchrht : unit -> float
val plstripc : string -> string -> float -> float -> float -> float -> float -> float -> float -> bool -> bool -> int -> int -> int array -> int array -> string array -> string -> string -> string -> int
val pltr1 : float array -> float array -> float -> float -> float * float
val pltr2 : float array array -> float array array -> float -> float -> float * float
val plset_pltr : (float -> float -> float * float) -> unit
val plunset_pltr : unit -> unit
val plset_mapform : (float -> float -> float * float) -> unit
val plunset_mapform : unit -> unit
val plset_defined : (float -> float -> int) -> unit
val plunset_defined : unit -> unit
val plstransform : (float -> float -> float * float) -> unit
val plunset_transform : unit -> unit
type plplot_grid_method_type =
  1. | PL_GRID_CSA
  2. | PL_GRID_DTLI
  3. | PL_GRID_NNI
  4. | PL_GRID_NNIDW
  5. | PL_GRID_NNLI
  6. | PL_GRID_NNAIDW
type plplot_parse_method_type =
  1. | PL_PARSE_PARTIAL
  2. | PL_PARSE_FULL
  3. | PL_PARSE_QUIET
  4. | PL_PARSE_NODELETE
  5. | PL_PARSE_SHOWALL
  6. | PL_PARSE_OVERRIDE
  7. | PL_PARSE_NOPROGRAM
  8. | PL_PARSE_NODASH
  9. | PL_PARSE_SKIP
val plslabelfunc : (plplot_axis_type -> float -> string) -> unit
val plunset_labelfunc : unit -> unit
val plsabort : (string -> unit) -> unit
val plunset_abort : unit -> unit
val plsexit : (string -> int) -> unit
val plunset_exit : unit -> unit
val plgriddata : float array -> float array -> float array -> float array -> float array -> plplot_grid_method_type -> float -> float array array
val plparseopts : string array -> plplot_parse_method_type list -> unit

Non-standard convenience functions (not part of the standard PLplot API.

val plcalc_device : float -> float -> float * float

plcalc_device x y will give the device position, in normalized device coordinates, of the world coordinates (x, y).

val plfullcanvas : unit -> unit

plfullcanvas () maximizes the plot viewport and window. Dimensions are set to (0.0, 0.0) to (1.0, 1.0).

val plpolyline : float array -> float array -> unit

Draw an unfilled polygon. The only functional difference between this and plline is that this function will close the given polygon, so there is no need to duplicate points to have a closed figure.