Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!news.nosignal.org!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'next,': 0.07; 'scaling': 0.07; 'subject:help': 0.07; 'python': 0.09; 'compute': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rounding': 0.09; 'terry': 0.09; 'subject:python': 0.11; 'file,': 0.15; '386': 0.16; 'csv': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.17; 'script.': 0.17; 'subject:need': 0.17; 'jan': 0.18; 'windows': 0.19; 'variable': 0.20; 'written': 0.20; 'least': 0.25; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '----------': 0.26; 'creating': 0.26; 'am,': 0.27; 'header:X-Complaints-To:1': 0.28; 'decide': 0.28; 'factor': 0.29; 'error': 0.30; 'file': 0.32; 'print': 0.32; 'consist': 0.33; 'problem': 0.33; 'to:addr:python- list': 0.33; 'skip:- 50': 0.34; 'so,': 0.35; 'there': 0.35; 'next': 0.35; 'received:org': 0.36; 'characters': 0.36; 'data.': 0.36; 'subject:with': 0.36; 'subject: (': 0.36; 'level': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'there,': 0.38; 'to:addr:python.org': 0.39; 'easily': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'first': 0.61; 'email addr:gmail.com': 0.63; 'results': 0.65; 'sounds': 0.71; 'increase': 0.72; 'ini': 0.84; 'received:fios.verizon.net': 0.84; 'that),': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: I need help with graphs in python (2.7.3.1) Date: Tue, 18 Dec 2012 11:43:17 -0500 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355849013 news.xs4all.nl 6842 [2001:888:2000:d::a6]:42673 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35062 On 12/18/2012 6:29 AM, hevymetl07@gmail.com wrote: > Hi there, I hope that there is someone willing to help me out, I need > to generate a graph in Python 2.7.3.1, There is only 2.7.3, no 2.7.3.1, at least not officially. > I had to make a .CSV file from my Windows system logs (already did > that), and the following steps must bw written in the form of a > Python 2.7.3.1 script. > > These are some steps I need to do first before creating the graph: - > Get the name of a CSV file from an ini file, - Next, read a line from > this CSV file, - Increase a variable depending on the Log level > (information, warning, error, critical), - Read the next line, - Then > I need to print these results in a Graph. It sounds like your data consist of 4 counts. If so, you can easily make a simple bar plot with characters Log level Number Plot (x = 10) ---------- ------ ----------------------------------------------------- infomation 386 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx warning 97 xxxxxxxxxx error 5 x critical 23 xxx The main problem is to compute the scaling factor from the data. You also have to decide on the rounding (I rounded up). -- Terry Jan Reedy