Skip to Content

avec GchartWrapper

>>> from GChartWrapper import *
>>> G = Line('27,76.5,92,34,65,81,82,80,63,24,70.54,45.89,29.75,27',encoding='text')
>>> G.size(250,100)
>>> G.axes.type('xy')
>>> G.url
'http://chart.apis.google.com/chart?chxt=x,y&chd=t:27,76.5,92,34,65,81,82,80,63,24,70.54,45.89,29.75,27&chma=0,0,30,0&chs=250x100&cht=lc'
>>> G.show() #montre le graphique dans le butineur par défaut
>>> import urllib2
>>> fichier = urllib2.urlopen(G.url)
>>> open('chartGchart.png','wb').write(fichier.read())