Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35051

Re: I need help with graphs in python (2.7.3.1)

Date 2012-12-18 13:20 +0100
From Thomas Bach <thbach@students.uni-mainz.de>
Subject Re: I need help with graphs in python (2.7.3.1)
References <ff5f2d01-7271-42ed-860f-ce2290967514@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.1016.1355833240.29569.python-list@python.org> (permalink)

Show all headers | View raw


Hi,

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@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[1],

> - Next, read a line from this CSV file,
well, the csv module[2] 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[3]. 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[4] 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,
     Thomas Bach.

Footnotes: 
[1]  http://docs.python.org/2/library/configparser.html

[2]  http://docs.python.org/2/library/csv.html

[3]  http://docs.python.org/2/library/collections.html#collections.Counter

[4]  http://matplotlib.org/gallery.html

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

I need help with graphs in python (2.7.3.1) hevymetl07@gmail.com - 2012-12-18 03:29 -0800
  Re: I need help with graphs in python (2.7.3.1) Thomas Bach <thbach@students.uni-mainz.de> - 2012-12-18 13:20 +0100
  Re: I need help with graphs in python (2.7.3.1) Terry Reedy <tjreedy@udel.edu> - 2012-12-18 11:43 -0500
  Re: I need help with graphs in python (2.7.3.1) Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-12-18 17:59 -0500

csiph-web