Elixir graphs with Gnuplot
We have released the Gnuplot library that allows you to generate server side graphs and plots from Elixir and the Gnuplot utility. It has been tested with Ubuntu, Centos and Mac OS X but not yet with Microsoft Windows.
See the README file for instructions. Here is an example:
{:ok, _cmd} = Gnuplot.plot([
[:set, :term, :png],
[:set, :output, "/tmp/rand.png"]
[:set, :title, "rand uniform vs normal"],
[:set, :key, :left, :top],
[:plot,
G.list(
["-", :title, "uniform", :with, :points],
["-", :title, "normal", :with, :points])]
],
[
for(n <- 0..200, do: [n, n * :rand.uniform()]),
for(n <- 0..200, do: [n, n * :rand.normal()])
])
This is a port of the Clojure Gnuplot library by aphyr.