Plotting Using PLPlot
dsimcha
dsimcha at yahoo.com
Sat May 9 20:19:53 PDT 2009
As the scientific computing libraries for D improve, I find myself wanting
more and more to be able to plot stuff straight from D without having to rely
on kludges like writing data out to a file and then calling Python or Matlab
or something. I've noticed that PLPlot has D bindings. Its license is also
reasonably permissive (LGPL). This is certainly an improvement over nothing,
but the API kind of sucks because it was written in C. For example, instead
of ranges or D arrays of arbitrary type, you pass data in as a double* and a
number of data points.
On the other hand, all the nitty-gritty, low-level, probably
platform-specific, stuff needed for a plotting library is (I guess) pretty
good. This led me to the following idea for how to get a good D plotting lib
for relatively few man-hours: Take the low-level stuff from PLPlot, and
reimplement the higher level stuff on top of it in pure D, using the full
power of templates, ranges, builtin arrays, etc. I'm considering making this
my next hobby project, and I'm interested in some suggestions on how it should
be done (what a good API would be, etc.), as well as getting an idea of how
many people are interested in something like this.
More information about the Digitalmars-d
mailing list