Home

Awesome

Graph

This is a basic plotting library, written in nim.
The end goal is to have a tiny plotting lib to use with jupyternim
Outputs .png or .svg files, or a string that contains the png as binary data or the svg as string.

For what I want to achieve and where I'm at, see target

Some examples are in examples:

Note: text labels are WIP, only for svg atm

Example

current

import graph, math, arraymancer
let 
  x  = arange(0.0'f64, 10,0.1)
let 
  y  = sin(x)
  y2 = cos(x)
var srf = plot(x.data,y.data)
srf.plot(x.data, y2.data)
srf.grid
# Save to file
srf.saveTo("currentpng.png")
srf.saveTo("currentsvg.svg")

Current structure

Inside graph there are specific apis:

TODO: