Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple gnuplot controller written in D

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README
Octocat-spinner-32 example.d
Octocat-spinner-32 gnuplot.d
README
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();
with(plot)
{
    Title = "Test Plot";
    XRange = [-1, 1];
    YRange = [-1, 1];
    PlotRaw("x*x*x");
}

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.

-SiegeLord
Something went wrong with that request. Please try again.