gr-crystal

Crystal binding for GR framework

A (still incomplete) interface to GR framework from Crystal

Installation

  1. You need to install GR in the standard way and set the enviromental variable GRDIR point to the installed directory.

  2. Add the dependency to your shard.yml:

    dependencies:
      grlib:
        github: jmakino/gr-crystal
  3. 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.

Usage

Essentially the same as that for C binging. Difference:

Example of API

void gr_polyline(int, double *, double *)

is called as

GR.polyline(Array(Float64), Array(Float64))

Examples

polyline plot

polyline sample output

contour plot

contour sample output

3d contour plot

contour sample output

3d animation

3d animation sample output

log-log plot

log-log plot sample output

semilog plot

semilog plot sample output

Todo

All source and documents should be generated automatically...