On Fri, 01 Jun 2007, David Todd apparently wrote:
> (1,"Ponies", 4,"sheep", 9, "cows", 16, "newts") What do
> I need to do to get those values as a bar graph?
import pyx
raw = (1,"Ponies", 4,"sheep", 9, "cows", 16, "newts")
iraw = iter(raw)
d = [[name,val] for val,name in zip(*[iraw]*2)]
datalist = pyx.graph.data.list(d,xname=1,y=2)
g = pyx.graph.graphxy(width=8, x=pyx.graph.axis.bar())
g.plot(datalist,styles = [pyx.graph.style.bar(barattrs=[pyx.color.rgb.blue])])
g.writeEPSfile("/temp/temp.eps")
hth,
Alan Isaac
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user