Werner
Werner

Reputation: 51

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 data 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)

Upvotes: 0

Views: 1115

Answers (1)

schlamar
schlamar

Reputation: 9511

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.

Upvotes: 1

Related Questions