Python论坛  - 讨论区

标题:[python-chinese] 请问python中有哪些图表库?

2006年09月10日 星期日 15:07

ooox lee leeooox在gmail.com
星期日 九月 10 15:07:13 HKT 2006

我想把数据库里面的数据生成一个图表,比如柱状图,饼状图等等,有什么好用的库?
谢谢.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20060910/492b5c36/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年09月10日 星期日 17:28

ainulinde ainulinde在gmail.com
星期日 九月 10 17:28:44 HKT 2006

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
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年09月11日 星期一 01:38

Young fivesheep在gmail.com
星期一 九月 11 01:38:38 HKT 2006

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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年09月11日 星期一 08:12

Kevin Rong kevin.rong在gmail.com
星期一 九月 11 08:12:25 HKT 2006

我用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

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年09月11日 星期一 09:33

Slowness Chen chenzh在bhh.com.cn
星期一 九月 11 09:33:40 HKT 2006

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 



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号