I am looking for a library to generate svg diagrams in python (I fetch data from a sql database). I have found python-gd, but it has not much documentation and last update was in 2005 so I wonder if there are any other libraries that are good for this purpose.
I am mostly thinking about simple line graphs, something like this:
Consider svgwrite http://packages.python.org/svgwrite/
As you're looking for simple line graphics, probably, CairoPlot will fit your needs as it can generate svg output files out of the box. Take a look at this.
This example image shows only a few of its capabilities. Using the trunk version available at launchpad you'll be able to add a legend box and add axis titles.
Besides that, using the trunk version, it's possible to generate:
Being not exactly related to SVG plots, but searching for the same thing I have found a good source of carefully collected useful info to answer your question: http://wiki.python.org/moin/NumericAndScientific/Plotting
I have tried to collate a list of available charting libraries(its an ongoing work, wherein i keep updating the list) : http://blizzardzblogs.blogspot.com/2010/12/data-visualization-charts-and.html
I feel that protovis would do the job for you. Its
So nothing more to learn :)
pyCairo is an option worth looking at.
svgfig is worth a look:
http://code.google.com/p/svgfig/