sanette / oplot Goto Github PK
View Code? Open in Web Editor NEWMathematical plotting library for ocaml
Home Page: https://sanette.github.io/oplot/oplot/Oplot/index.html
License: Other
Mathematical plotting library for ocaml
Home Page: https://sanette.github.io/oplot/oplot/Oplot/index.html
License: Other
I tried the new version: opam pin oplot https://github.com/sanette/oplot.git#0.6
It seemed to install ok:
Do you want to continue? [Y/n] y
The following system packages will first need to be installed:
sdl2_image sdl2_ttf
<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><> ๐ซ
Let opam run your package manager to install the required system packages?
(answer 'n' for other options) [Y/n] y
+ /opt/homebrew/bin/brew "install" "sdl2_image" "sdl2_ttf"
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_image/manifests/2.6.2
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_image/blobs/sha256:c9fa27615fee118666ea9f72fbbd12dd56b834196fc097f81ee2fb3d6ac134f2
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c9fa27615fee118666ea9f72fbbd12dd56b834196fc097f81ee2fb3d6ac134f2?se=2022-11-26T12%3A30%3A00Z&sig=zA1PjmgDgCoqHEokkssk15DHt%2F5iMygN0mNnHckbKOk%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/manifests/1.8.2
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/blobs/sha256:996724436ae47440832ffe2caa9bec0d0f374f8885f83925453895fcfc80d8c2
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:996724436ae47440832ffe2caa9bec0d0f374f8885f83925453895fcfc80d8c2?se=2022-11-26T12%3A30%3A00Z&sig=iOGSTNHtmssKAGmvjtPw7Mk9mI3waPvga4wZUiXmv6k%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_ttf/manifests/2.20.1
- ==> Downloading https://ghcr.io/v2/homebrew/core/sdl2_ttf/blobs/sha256:965b06109282c56c513b3836bdced71d34c7b532b42a5a0fad1188cb171f12f1
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:965b06109282c56c513b3836bdced71d34c7b532b42a5a0fad1188cb171f12f1?se=2022-11-26T12%3A30%3A00Z&sig=Nz16FisllYs8jbePIBrRrGGVNas6R2ee0f6UJhHzyvg%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Pouring sdl2_image--2.6.2.arm64_ventura.bottle.tar.gz
- ๐บ /opt/homebrew/Cellar/sdl2_image/2.6.2: 12 files, 349.4KB
- ==> Running `brew cleanup sdl2_image`...
- Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
- Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
- ==> Installing dependencies for sdl2_ttf: libx11
- ==> Installing sdl2_ttf dependency: libx11
- ==> Pouring libx11--1.8.2.arm64_ventura.bottle.tar.gz
- ๐บ /opt/homebrew/Cellar/libx11/1.8.2: 1,054 files, 7MB
- ==> Installing sdl2_ttf
- ==> Pouring sdl2_ttf--2.20.1.arm64_ventura.bottle.tar.gz
- ๐บ /opt/homebrew/Cellar/sdl2_ttf/2.20.1: 12 files, 255.2KB
- ==> Running `brew cleanup sdl2_ttf`...
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> ๐ซ
...
Done.
Trying the example in utop I get the following:
utop # #use "topfind";;
- : unit = ()
Findlib has been successfully loaded.
utop # #thread;;
utop # #require "oplot";;
Exception:
Dl.DL_error
"dlopen(libSDL2_image-2.0.0.dylib, 0x0002): tried: 'libSDL2_image-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2_image-2.0.0.dylib' (no such file), '/usr/lib/libSDL2_image-2.0.0.dylib' (no such file, not in dyld cache), 'libSDL2_image-2.0.0.dylib' (no such file), '/usr/lo"... (* string length 419; truncated *).
Raised at Dl._report_dl_error in file "src/ctypes-foreign/dl.ml", line 44, characters 20-44
Called from Tsdl_image.Image.dllib in file "src/tsdl_image.ml", line 38, characters 13-47
Called from unknown location
Exception:
Dl.DL_error
"dlopen(libSDL2_ttf-2.0.0.dylib, 0x0002): tried: 'libSDL2_ttf-2.0.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2_ttf-2.0.0.dylib' (no such file), '/usr/lib/libSDL2_ttf-2.0.0.dylib' (no such file, not in dyld cache), 'libSDL2_ttf-2.0.0.dylib' (no such file), '/usr/local/lib/li"... (* string length 405; truncated *).
Error: Reference to undefined global `Tsdl_ttf'
sdl1.2 is now very old and minimally updated. It should be relatively easy to convert everything to SDL2.
I can run the example code in an ocaml shell now
i.e.
#use "topfind"
#thread
#require "oplot"
open Oplot.Plt
let p = plot sin (-2.) 20.
let a = axis 0. 0.;;
display [ Color red; p; Color black; a ]
But if I add (libraries oplot)
to the dune file of my project, when I dune build
I get:
ld: library not found for -llablgl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
File "_none_", line 1:
Error: Error while building custom runtime system
...this is without yet having any oplot (or lablgl) code of my own, just adding the library.
I can #require "lablgl"
and open modules from it in an ocaml shell, so it seems installed ok.
Any ideas?
When I press esc
to close the oplot window:
I've mostly been testing from utop
, but same behaviour in ocaml
shell.
We tried a few tweaks already, see here #2 (comment) but so far this behaviour persists
Hello,
First off; thanks for such a useful package! Plotting with this package feels surprisingly expressive and modular.
Is there any possibility of using the module to create plots in a file (lets say, using the png user device) on a headless machine? i.e. via an ssh shell, or Linux's VT100, etc.
I tried on another machine over ssh recently, but receive this error:
INFO: Loading Sdl_image, Target = linux
INFO: Loading Sdl_ttf, Target = linux
xdpyinfo: unable to open display "".
Can't open display
Can't open display
I assume it's just passing some errors from SDL along, but I haven't read into the internals; just curious about the practicality of this request!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.