2006年09月10日 星期日 15:07
我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库? 谢谢. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20060910/492b5c36/attachment.html
2006年09月10日 星期日 17:28
matplotlib.sf.net 开源 www.advsofteng.com 收费 这俩都可以画柱状图,饼状图。 On 9/10/06, ooox lee <leeooox at gmail.com> wrote: > > 我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库? > 谢谢. > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese >
2006年09月11日 星期一 01:38
matplotlib 好像有自己的图形库? 能跟wxpython结合吗? On 9/10/06, ainulinde <ainulinde在gmail.com> wrote: > matplotlib.sf.net 开源 > www.advsofteng.com 收费 > 这俩都可以画柱状图,饼状图。 > > > On 9/10/06, ooox lee <leeooox在gmail.com> wrote: > > > > 我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库? > > 谢谢. > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
2006年09月11日 星期一 08:12
我用pil可以实现饼图
import sys,Image, ImageDraw, ImageFile, re,ImageFont
font='c:\\windows\\fonts\\arial.ttf'
f=open(sys.argv[1],'r')
im=Image.new("RGB",[800,500],color="white")
draw=ImageDraw.Draw(im)
myfont=ImageFont.truetype(font,16)
draw.setfont(myfont)
totalangle=360
currentangle=0
totalnum=0
for line in f:
value=int(re.split(",",line)[1][:-1])
totalnum+=value
f.seek(0)
color=['red','purple','magenta','firebrick','salmon','lightseagreen','lightskyblue','gold','black'
\
,'lightslategray','lightsteelblue','lightyellow']
for line in f:
percent=float(re.split(",",line)[1][:-1])/float(totalnum)
degree=int(percent*360)
draw.pieslice((50,50,400,400),currentangle,(currentangle+degree),fill=color[i])
currentangle+=degree
totalangle-=degree
im.show()
2006/9/11, Young <fivesheep在gmail.com>:
> matplotlib 好像有自己的图形库? 能跟wxpython结合吗?
>
> On 9/10/06, ainulinde <ainulinde在gmail.com> wrote:
> > matplotlib.sf.net 开源
> > www.advsofteng.com 收费
> > 这俩都可以画柱状图,饼状图。
> >
> >
> > On 9/10/06, ooox lee <leeooox在gmail.com> wrote:
> > >
> > > 我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库?
> > > 谢谢.
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chinese在lists.python.cn
> > > Subscribe: send subscribe to
> > > python-chinese-request在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > > python-chinese-request在lists.python.cn
> > > Detail Info:
> > > http://python.cn/mailman/listinfo/python-chinese
> > >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
2006年09月11日 星期一 09:33
matplot supports lots of gui backends , including wx. ----- Original Message ----- From: "Young" <fivesheep在gmail.com> To: <python-chinese在lists.python.cn> Sent: Monday, September 11, 2006 1:38 AM Subject: Re: [python-chinese]请问python中有哪些图表库? > matplotlib 好像有自己的图形库? 能跟wxpython结合吗? > > On 9/10/06, ainulinde <ainulinde在gmail.com> wrote: >> matplotlib.sf.net 开源 >> www.advsofteng.com 收费 >> 这俩都可以画柱状图,饼状图。 >> >> >> On 9/10/06, ooox lee <leeooox在gmail.com> wrote: >> > >> > 我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库? >> > 谢谢. >> > _______________________________________________ >> > python-chinese >> > Post: send python-chinese在lists.python.cn >> > Subscribe: send subscribe to >> > python-chinese-request在lists.python.cn >> > Unsubscribe: send unsubscribe to >> > python-chinese-request在lists.python.cn >> > Detail Info: >> > http://python.cn/mailman/listinfo/python-chinese >> > >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号