开发者

how to create a bar chart with matplotlib using table data

The idea is quite simple: I want to create a bar chart with matplotlib using data of a table that is being generated before.

I expect a chart like this one:

http://matplotlib.sourceforge.net/examples/pylab_examples/table_demo.html

But Im wondering how to do this just by using data out of a dbf table instead.

It seems to be somehow possible but even this example I didn't get to work:

http://www.packtpub.com/article/plotting-data-using-matplotlib-part2?utm_source=js_matplotlib_abr3_1009&utm_medium=content&utm_campaign=janice

As I am a beginner with matplotlib I would like to learn this using a functioning example.

1) Are there any examples or code snipplets around to look at that any of you could recommend?

2) What 开发者_如何学Pythondata format would be best for this task (my tool generates dbf, but it's probably not a big deal to convert either to csv or Excel)


There is dbfpy which allows you reading from a DBF file. But I suggest using a CSV file and numpy.loadtxt if possible, because it should be much faster.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜