A simple gnuplot controller written in D
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a simple gnuplot(http://www.gnuplot.info/) controller. The term controller
in this context means that this code spawns a gnuplot process and controls it via
pipes. Two syntaxes are supported by this code:

(new CGNUPlot()).Title("Test Plot").XRange([-1, 1]).YRange([-1, 1]).PlotRaw("x*x*x");

Or this syntax:

auto plot = new CGNUPlot();
    Title = "Test Plot";
    XRange = [-1, 1];
    YRange = [-1, 1];

It was tested on Linux 64 bit with Tango D2 trunk and gnuplot 4.4. It'll probably work with other versions of gnuplot as well. It works ok on Windows with the following caveat: the plot windows will close if the main program closes also. If you want interactive plots to remain, you need to keep your main program alive as well (see example.d for one solution). This is a limitation of gnuplot and Windows in general.

It does not use temporary files to transfer data to gnuplot, instead using inline text entry. This probably makes it faster than similar controllers.

I am still adding features and possibly will be changing the API a bit in the future, but the general philosophy of this controller probably won't change: I didn't intend to provide a fully featured plotting program (although you can directly interact with the gnuplot process), rather I just wanted to have a way to quickly plot a few quick line and image plots and there was no good D library that could do this at the time of this writing.