0

I want to generate compound charts (e.g: Bar+line) from my database using python.

How can i do this ?

Thanks in Advance

Ali
  • 115
  • 1
  • 2
  • 9
  • possible duplicate of [Pretty graphs and charts in Python](http://stackoverflow.com/questions/52652/pretty-graphs-and-charts-in-python) –  Apr 17 '11 at 11:15

4 Answers4

3

You might want to look up Matplotlib.

PrettyPrincessKitty FS
  • 6,117
  • 5
  • 36
  • 51
3

This is extremely simple to do using matplotlib using the plot and bar methods:

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.plot

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar

The matplotlib gallery is usually a good place to start for examples of working code:

http://matplotlib.sourceforge.net/gallery.html

JoshAdel
  • 66,734
  • 27
  • 141
  • 140
1

Pretty easy to do with pygooglechart -

You can basically follow the bar chart examples that ship with the software and then use the add_data_line method to make the lines on top of the bar chart

0

If you are rendering to a web browser, you might also consider jQuery and Flot using python-flot-utils. If you want static images, the other two answers are correct. Matplotlib is excellent.

Carl F.
  • 6,718
  • 3
  • 28
  • 41