package oplot

  1. Overview
  2. Docs

Plot objects

val has_anim : Plt.plot_object -> bool
val gllist_empty : unit -> Plt.gllist

Opengl rendering and interface

type gl_handler =
  1. | SDL
  2. | GLUT
  3. | GTK
val set_default_gl : gl_handler -> unit
val init : unit -> unit

Set various rendering values to their defaults.

val get_mouse_x : unit -> int
val get_mouse_y : unit -> int
val set_mouse_x : int -> unit
val set_mouse_y : int -> unit
val get_window_height : unit -> int
val get_frame_length : unit -> int

Get the target frame duration in ms.

val set_frame_length : int -> unit
val gtk_mainloop : Plt.plot_object -> int
val gl_init : ?show:bool -> unit -> unit
val gl_resize : unit -> unit
val scale : float -> float

multiply by the GL_SCALE

val iscale : int -> int

multiply by the GL_SCALE and round

val set_line_width : ?dev:Plt.plot_device -> float -> unit
val set_point_size : ?dev:Plt.plot_device -> float -> unit
val get_light : unit -> bool
val toggle_light : unit -> unit

Toggle 3D lighting

val force_refresh : unit -> unit
val gl_mouse_motion : int -> int -> unit
val interrupt : unit -> unit

Low-level rendering

val latex_to_sdl : string -> int -> Sdlvideo.surface

Shell interaction with other programs

exception Shell_error of int * string
val oplot_dir : string

The directory shared by oplot and goplot for various assets

val has_latex : bool

Whether LaTeX is detected on the computer

val has_gs : bool

Whether gs ghostscript is detected on the computer

val pngalpha : unit -> bool

Whether gs supports the pngalpha device

val has_fig2dev : bool

Whether fig2dev is detected on the computer

val first_time : unit -> bool

Whether the $HOME/.oplot directory already exists