[IPOL discuss] matplotlib? [Re: courve 1D ...]

Miguel Colom Miguel.Colom at cmla.ens-cachan.fr
Wed Oct 26 12:16:12 CEST 2011


> I like matplotlib, it is very convenient and produces very graphics in
> many formats, but...
>
> version 1.0.0 was released 2011-01-04
>   This means the first stable API is less than one year old. I think
>   it is fresh, some distributions won't come with this version (Debian
>   stable has 0.99.3) and a script using matplotlib will probably have
>   to be adapted to API changes in the coming years
>   -> https://github.com/matplotlib/matplotlib/blob/master/CHANGELOG
>   -> http://packages.debian.org/python-matplotlib

Well, the script is using matplotlib right now and it's not a complex
program, so adapting it to possible changes of the API wouldn't be a great
deal.

There's no guarantee that the APIs of the components we're using in the
server don't change. CherryPy, PIL or PySQLite can change also.

I agree with you on that the matplotlib API is younger than others, but if
we manage to have few scripts to draw curves, adapting them should be easy
in case the API changes.

> matplotlib depends on many other software components
>   Python (of course), NumPy, libgtk, libgcc, tcl/tk... which in turn
>   need libglib, libx11, ...
>   I think this dependencies are quite heavy for "drawing a curve", and
>   some of the matplotlib features (interactive GUI) and the
>   dependencies involved are nice on a   desktop but completely
>   irrelevant on a server setup. In my opinion, matplotlib should be
>   split in 2 parts (drawing tools and interactive graph tools) to be
>   usable with IPOL.

It's true matplotlib needs all those packages, but other packages like,
for example gnuplot, have similar or even more dependencies.

Anyway, matplotlib can be used in a non-interative way (egg output), that
is, reading its data, processing it and saving the result to a PNG without
using X11 or showing anything on the screen.

This is what the script is doing right now on the dev. server and it works
well. And no alternative has been presented/built yet.

Miguel



More information about the discuss mailing list