Skip to content

jonas-bh/plotly-ocaml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plotly-ocaml

OCaml wrapper for Plotly Open Source Graphing Library. It provides 2 backend interfaces:

Standalone version via Pyml : Using Python library of Plotly. For standalone programs.

JSOO version : Using JS library of Plotly and Js_of_ocaml. For JSOO programs.

Supported features

Plotly-ocaml only covers small subset of Plotly features, but it is easy to add new graphs, data and layout attributes. Your contributions are welcome.

Testing

There are tests suites to ensure that the generated graph specifications are correct, for both JSOO and Python backends.

To run all regression tests:

dune test

To update reference files (after intentional changes):

dune exec test/generate_references.exe

Type safety

There is no type dicipline to check your misuses of attributes, for example using z attribute in 2d scatter graph. Such cool typing can be introduced using phantom type/GADT with sub-types but I want to keep this library dumb as possible for now.

Pyml issue

pyml.20220905 does not load the Python runtime in mac OS + Homebrew. Use the fixed version of pyml if you have trouble executing python/demo/demo.exe:

$ opam pin add pyml.20220906 git+https://gitlab.com/dailambda/pyml#b09f7160

About

plotly-ocaml with a number of additional bindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • OCaml 97.3%
  • Dune 1.7%
  • HTML 1.0%