Plot2Kill 0.02
dsimcha
dsimcha at yahoo.com
Sun Jul 18 13:36:30 PDT 2010
I've successfully ported dflplot to gtkD and gotten it to the point where it
works in every way (except speed/memory use; gtkD is a little slow/resource
hungry) at least as well as the original DFL version. Now that I can't call
it dflplot anymore because it supports multiple GUI libs, I'm calling it
Plot2Kill. The status of the DFL version hasn't changed since I originally
posted about dflplot. Here's what works and what needs work, with respect to
the gtkD version wherever there's a difference:
Working: Histograms, bar plots, scatter plots, line plots, QQ plots, ROC
curves, heat maps, subplot windows, error bars, rotated text, programmatic
saving in raster formats, interactive saving from default plot window
(right-clicking brings up a save dialog), zooming in on a single figure from
subplot window (double-click on the figure to zoom in).
Needs work: Documentation needs improvement and needs to be put up somewhere
(will happen once I get my own dsource project, as opposed to Scrapple),
saving in vector formats, Cairo port, zooming in on areas within a single
figure via the GUI (can be done programmatically), customizability of look and
feel of figures (things like fonts, colors, margins, line styles, etc.),
general refactoring from "make it work" to "make it right" stage.
I would say that there will probably not be too many breaking changes (at the
source level) to the basic API, i.e. creating a figure and showing it in a
default plot window, but the more advanced stuff that you'd care about if you
want to integrate plots into your own GUI is likely to be refined via breaking
changes. A stable ABI will probably never happen because it constrains the
evolution of the project too much.
Code:
http://dsource.org/projects/scrapple/browser/trunk/dflplot/Porting
Demo figure (created and saved programmatically, no longer a screenshot):
http://cis.jhu.edu/~dsimcha/plot2killGTK.png
How to build: Install gtkD, and then just compile all of the .d files with to
a library with -version=gtk. It doesn't matter if you pass in the DFL files
when building the GTK version because all the irrelevant code will be
version-statemented out.
Please let me know if this works properly on OS's besides Windows. I've only
tested it on Windows, although GTK is cross-platform and I only used the
high-level gtkD functionality in this lib, so I don't see why it wouldn't work
on any other OS with gtkD support.
More information about the Digitalmars-d-announce
mailing list