I need help with graphs in python (220.127.116.11)
thbach at students.uni-mainz.de
Tue Dec 18 13:20:25 CET 2012
Most of the tasks you have to do can be achieved quite easily with the
standard library (except the plotting).
On Tue, Dec 18, 2012 at 03:29:49AM -0800, hevymetl07 at gmail.com wrote:
> These are some steps I need to do first before creating the graph:
> - Get the name of a CSV file from an ini file,
Have a look at the ConfigParser module,
> - Next, read a line from this CSV file,
well, the csv module apparently is a good choice for that,
> - Increase a variable depending on the Log level (information,
> - warning, error, critical),
you maybe want to use collections.counter for that. Anyways, I
think matplotlib can handle the counting for you…
> - Read the next line,
this is just iteration over the csv instance you created with your file
> - Then I need to print these results in a Graph.
I use matplotlib for this purpose, have a look at their gallery to
decide what kind of plot best fits your needs.
I'd recommend to install ipython and start playing around with the
modules I just told you. If you are stuck somewhere read the
documentation properly (it's actually all in there) and come back
again if you cannot come up with a solution.
Hope this helps,
More information about the Python-list