package oplot

  1. Overview
  2. Docs
Mathematical plotter library for ocaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.80.tar.gz
md5=d94a8e090bdeb7e72f1339f0c984ea41
sha512=2988153afb8d7f27d64fd0b8cad980562cbaa1b158e1f54d8952728d92d870276c08d3a2d9e80d95a27a3240684dae41aa8ffb31252d7c33993ae71877b0b97b

Description

High-quality plotting of 2D usual mathematical functions, including animations and LaTeX formulas. Supports also 3D surfaces with interactive rotating.

Tags

plot 2D 3D math

Published: 06 Oct 2025

README

Oplot

Mathematical plotting library for ocaml

2D plot and LaTeX

3D surface

gammasurf3d
  • 2D plots

    • function y = f(x)
    • parametric curves
    • can use mathematical functions from other libraries like gsl
    • can use LaTeX to display text and formulas
    • animations
    • Matrix or grid display
    • ...
  • 3D plots

    • parametric surfaces
    • 3D graphs z = f(x,y)
    • interactive 3D rotation and zoom
    • ...
  • Many renderers

    • GPU graphics (opengl/sdl)
    • Graphics package
    • high quality vector graphics in EPS or PDF files
    • xfig files
    • image screenshots

Documentation

Examples and API documentation.

GUI

An official standalone GUI for oplot: goplot

Examples

The top directory contains examples that can be run from the ocaml toplevel. See the README file.

Install v 0.80

The current version does not require lablgl, but instead you should install tgls and gl-legacy:

opam install tgls
opam pin https://github.com/sanette/gl-legacy.git
opam pin https://github.com/sanette/oplot.git

Install v 0.72

  • oplot<0.80 requires lablgl. If you have any trouble with this, try this one.:
opam pin add https://github.com/sanette/lablgl-lib.git
opam install lablgl.1.07-lib
opam install oplot.0.72

Requirements

  • For PDF output you need to install the fig2dev system package.
  • For LaTeX display you need a working LaTeX installation; for instance install the texlive system package.
  • For using the Gnu Scientific Library, install the gsl opam package:
opam install gsl
  • For rendering via the OCaml Graphics library (currently not recommended), you need to use the oplot-graphics opam package.

Dependencies (7)

  1. ocaml >= "4.05.0"
  2. gl-legacy
  3. tgls
  4. tsdl >= "0.9.6"
  5. tsdl-ttf >= "0.3"
  6. tsdl-image >= "0.3.0"
  7. dune >= "2.7"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None