Hi everybody, I just found your application, and I'm
> stunned. You've done a great job. I'm the lead developer
> of another application called SciGraphica
> (http://scigraphica.sourceforge.net) and GtkExtra, a
> package of widgets for (among other things) plotting 2d,
> contour, 3d, and polar plots. SciGraphica is built on top
> of gtkextra and it's not competing with matplot in the
> sense that it aims at having a GUI based program ala
> Microcal Origin, with spreadsheets for editing and
> manipulating the data. I hope you agree that we can learn
> from each others experiences with algorithms, etc. This is
> precisely why I'm contacting you, guys!
Hi Adrian,
Thanks for the kind words. scigraphica looks like an incredible
project; combined with gtkextra it must keep you pretty busy.
> I have to confess that my contour and 3d plots are pretty
> "raw" in the sense that the algorithms I use are quite
> primitive and slow. I basicaly generate a delaunay
> triangulation and cut the triangles with planes, and draw
> the resulting polygons. I was wondering if you guys could
> give me some feedback about a good algorithm for plotting
> 2d contour plots, or at least, tell me where to look in
> your code to see if I can learn from it. Whare are the
> actual engines to plot the pie charts and contours, for
> instance?
The contouring engine is pure C code and is borrowed from the gist
library; see src/cntr.c. There are some python classes that sit on
top of this to create the graphics objects and labeling, and these are
in lib/matplotlib/contour.py. As far as we are able to determine, the
C code from gist does not have any licensing restrictions, and the
matplotlib contouring routines are all PSF/BSD compatible in their
licenses so you are welcome to borrow them for your own code. There
are many more publicly available routines you can consider since you
have a GPL license; matplotlib has a more permissive license and we
tryu to avoid GPL code for that reason. Most of the contouring
routines we considered, along with the licenses and possible patent
encumbrances, were discussed on the devel list last year in this
thread [Lhms-devel] Re: [Patch] New zone ZONE_EASY_RECLAIM take 3. (define ZONE_EASY_RECLAIM)[2/5] | Linux Hotplug Memory Support .
As far as the "actual engines" we use to make plots, matplotlib has
several engines it can use (PS, SVG, antigrain, GTK, Cairo, GD, ...)
All of the screenshots were produced with the antigrain renderer, a
C++ library for 2D antialiased rendering with full alpha channel
support (http://antigrain.com). We embed the antigrain rendered
images into a variety of GUI canvases (Tk, GTK, WX, FLTK, Qt) using a
bitmap transfer.
Hope this helps!
JDH