Matplotlib vs PyCha

Arjun Sarwal arjun at laptop.org
Thu Feb 7 02:20:41 EST 2008


Hi,

In continuation with my previous email[1] in which I had mentioned
that I was looking for python packages that would enable me to do
graphing/plotting of data in various formats. I searched through a
series of packages. One that I really liked was gtksheet (or
gtkextra?)[2]  which had various plotting functions (and also a
spreadsheet like interface, which I would eventually need) but there
hasn't been any development on that since a long time and that package
depends pygtk1 and python <<2.4 so it seems I can't use it.


After searching through more packages it seems to me that I have two options --

(A) PyCha [3]
Pros
* Very small package - 30KB. Just need to include these few python files [4]

Cons
* Very limited types of representations - just line, bar and pie chart
* For displaying it within a gtk window one needs to do some hackish
stuff. like making a cairo surface and cairo context and copying the
surface from within the python modules to the main program etc.


(B) Matplotlib [5]
Pros
* A __huge__ variety of display methods a large number of graphs, and
a large number of built in mathematical functions
* A large community develops on and/or around it. Quite well known.
* There is a well defined and supported method for embedding it in gtk

Cons
* Large size. Just the rpm is about 5MB. It requires python-dateutils
and pytz. The pytz rpm is another about 6MB



I am veering towards Matplotlib because it has some really amazing
functionality (see the screenshots page[4])

The solution to the large size could be that we fork the upstream
package by removing certain parts that we don't require. There are
things that we don't need. For example in the rpm that I downloaded I
noticed that we could remove the examples and also remove support for
other backends (just keep the gtk backend support)



Please give comments/feedback/suggestions that would help set a
direction for development.


thanks
Arjun

[1] http://lists.laptop.org/pipermail/sugar/2008-January/004211.html
[2] http://gtkextra.sourceforge.net/
[3] http://www.lorenzogil.com/projects/pycha/#Documentation
[4] http://www.lorenzogil.com/projects/pycha/browser/trunk/src
[5] http://matplotlib.sourceforge.net/screenshots.html



More information about the Devel mailing list