dflplot 0.01

dsimcha dsimcha at yahoo.com
Fri Jul 9 21:40:04 PDT 2010


In the spirit of making D2 a first-rate scientific computing language, I have
just uploaded the first usable version of my DFL-based dflplot  plotting
library to Scrapple.

Right now dflplot is still a work in progress, but it's good enough to be
useful for basic exploratory plotting in a scientific or statistical computing
context, especially in conjunction with other scientific libs like SciD and
dstats.  I'm sure of this because I've been eating my own dogfood with
pre-release versions for the past few days and am amazed at how much more I
like plotting stuff when I can do it w/o having to write stuff out to a text
file and read it back in Python or Octave and instead can plot it directly from D.

dflplot currently supports scatter plots, line plots, histograms, bar plots,
quantile-quantile plots and ROC curves.  It also supports subplots.  The
following limitations currently exist, which will hopefully be eliminated in
short order:

1. Rotated text for Y-Axis labels isn't available in DFL. Therefore, Y-Axis
labels are rendered in ugly columnar text.

2. There is currently no "proper" way to save a plot. This is because DFL's
Bitmap object doesn't provide a way to obtain the underlying pixels yet, and
core.stdc.windows doesn't seem to provide the necessary stuff to do it
manually via the Windows API. In the meantime, a workaround (at least for
manual, as opposed to programmatic, saving) is to take a screenshot using the
print screen key and save this.

3. Clipping isn't supported yet. If you set the axis limits of a plot such
that part of the plot would be cut off, an exception is thrown. Clipping will
likely be supported in the near future.

4. No options (such as axis limits, title, labels, etc.) are exposed yet via
the plot window GUI. This situation will be improved gradually, especially as
DFL improves.

5. Only works on Windows. Eventually, I'll abstract away a bunch of the GUI
logic and port this to gtkD when it matures, or (hopefully) DFL will be ported
to Linux.

The code is located at:  (Eventually this needs a full-fledged project)
http://dsource.org/projects/scrapple/browser/trunk/dflplot/dflplot.d

The docs are at:
http://cis.jhu.edu/~dsimcha/dflplot.html

For those who don't want to install dflplot, dfl and dstats (dstats is
necessary only for the demo/test function and is otherwise not a dependency)
but are curious what dflplot currently looks like, I've attached a screenshot
of a subplot window produced by the demo/test function.


More information about the Digitalmars-d-announce mailing list