Skip to content

A Jupyter-friendly 2D plotting library based on OCaml Archimedes

License

Notifications You must be signed in to change notification settings

akabe/jupyter-archimedes

Repository files navigation

jupyter-archimedes CI

A Jupyter-friendly 2D plotting library based on Archimedes.

jupyter-archimedes adds OCaml Jupyter backend to Archimedes, a 2D plotting library written in OCaml. You can plot and embed figures on Jupyter.

Screenshot

Getting started

Install jupyter-archimedes by opam:

opam install jupyter-archimedes

Usage

We show a simple example of jupyter-archimedes as follows:

#use "topfind" ;; (* or you can automatically load topfind by adding this line to ~/.ocamlinit *)
#require "jupyter-archimedes" ;;  (* an Archimedes backend is added. *)

let vp = A.init ~w:560. ~h:260. ["jupyter"] in
A.Axes.box vp ;  (* Draw tics. *)
A.fx vp sin 0.0 10.0 ;  (* Plot a sin curve from 0 up to 10. *)
A.close vp  (* Show a figure. *)

Other examples are in the notebooks directory.

About

A Jupyter-friendly 2D plotting library based on OCaml Archimedes

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published