grlib
Version, currently master branch1 version
- master branchlatestOct 9, 2022
github.com/jmakino/gr-crystal
Crystal API for GR framework
Installation
# Add this to your shard.yml
dependencies:
grlib:
github: jmakino/gr-crystal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.35.0- License
- MIT
- Author
- Jun Makino
Dependencies
This version declares no dependencies.
README
gr-crystal
Crystal binding for GR framework
A (still incomplete) interface to GR framework from Crystal
Installation
-
You need to install GR in the standard way and set the enviromental variable GRDIR point to the installed directory.
-
Add the dependency to your
shard.yml:dependencies: grlib: github: jmakino/gr-crystal -
Run
shards install
Getting started
At your project directory (where you ran shards install), try
crystal lib/grlib/examples/grsample.cr
should show a simple plot.
- GRDIR env variable should point to the directory where you placed gr files. In particular, lib and fonts directories should be there
- GKS_WSTYPE env variable should be set. For X11, its value should be "x11".
Usage
Essentially the same as that for C binging. Difference:
-
All size+pointer arguments to C array are replaced by Crystal arrays.
-
C char* is replaced by Crysral Sring
Example of API
void gr_polyline(int, double *, double *)
is called as
GR.polyline(Array(Float64), Array(Float64))
Examples






Todo
All source and documents should be generated automatically...
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Oct 9, 2022
- Crystal
0.35.0- Indexed
- yes
Dependents
Repository
github.com/jmakino/gr-crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1