[Tutor] pychart and debian

nephish nephish at xit.net
Mon Sep 19 02:03:43 CEST 2005


Danny Yoo wrote:

>On Sun, 18 Sep 2005, nephish wrote:
>
>  
>
>>anyone have luck getting pychart installed on debian ? there is no
>>debian package for it (that i have found thus far) and i need something
>>that will allow me to place some simple x, y plots on a chart in pygtk.
>>    
>>
>
>Hi sk,
>
>Ah, found it.  It's in the 'testing' and 'unstable' branches in Debian:
>
>    http://packages.qa.debian.org/p/python-pychart.html
>    http://packages.debian.org/unstable/python/python2.3-pychart
>
>If you're running 'stable', you may want to ask the Debian folks how easy
>it is to grab it from 'testing' and install it.
>
>If you install pychart from source, doing 'python setup.py install' should
>be sufficient, as long as you have ghostscript installed on your system.
>
>
>Best of wishes to you!
>
>
>  
>
ok, got the package installed, but it seems to not be working, or the 
examples are messed up.
here is the source

from pychart import *
theme.get_options()
data = [["Jan", 10], ["Feb", 22], ["Mar", 30]]

ar = area.T(x_coord = category_coord.T(data, 0),
            y_range = (0, None),
            x_axis = axis.X(label="Month"),
            y_axis = axis.Y(label="Value"))
ar.add_plot(bar_plot.T(data = data, label = "Something"))
ar.draw()

and here is what i get when i run it.

from: can't read /var/mail/pychart
./categbar.py: line 16: syntax error near unexpected token `data'
./categbar.py: line 16: `data = [["Jan", 10], ["Feb", 22], ["Mar", 30]]'
nephish at bitsbam:~$

what do you think may be wrong?
thanks for your help with the package by the way

-sk


More information about the Tutor mailing list