用Python动态生成图形 [英] Dynamically Generating a Graph in Python

查看:107
本文介绍了用Python动态生成图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在python中动态生成一个图表,这个图表可以在网页上显示。最好的方法是什么?


我想这样做的原因是因为我正在制作一个程序来支持
转换来自科学的数据探究网页。除了生成图表之外,我已经能够完成除了
之外的所有事情。


你的帮助会非常适合


---

Tim Henderson

Hi
I want to dynamically generate a graph in python that would be
displayable on a web page. What would be the best way to do this?

The reason I want to do this, is because I am making a program to
convert data from scientic probes into web pages. I have been able to
do every thing except the graph generation.

Your help would be much appriciated

---
Tim Henderson

推荐答案

Tim Henderson写道:
Tim Henderson wrote:
我想在python中动态生成一个可以在网页上显示的图形。最好的方法是什么?
I want to dynamically generate a graph in python that would be
displayable on a web page. What would be the best way to do this?




看看你是否可以在后台运行graphviz。

http://www.research.att.com/sw/tools/graphviz/


如果是,你需要根据你的数据创建一个输入文件

然后运行点工具

在它上面生成图形文件。


有pydot模块生成graphviz

文件:

http://dkbza.org/pydot.html


IMO有点太复杂,可能不值得这么麻烦。


点文件格式相当简单,你可能会更好

理解它,然后以这种格式直接生成

。如果你想自定义输出,你需要理解格式




Istvan。



See if you can run graphviz in the background.

http://www.research.att.com/sw/tools/graphviz/

If yes you''ll need to create an input file
based on your data then run the dot utility
on it to generate a graphics file.

There is pydot module that generates graphviz
files:

http://dkbza.org/pydot.html

IMO is a little bit too complicated, and might not be worth the trouble.

The dot file format is fairly simple and you might be better off
just understanding it and then generating directly
in that format. You will need to understand the format
anyhow if you want to customize the output.

Istvan.


你好蒂姆,


尝试调查Matplotlib。最近在他们的用户论坛上讨论了这个问题:

http://sourceforge.net/mailarchive/f...forum_id=33405


Darren


Tim Henderson写道:
Hi Tim,

Try looking into Matplotlib. There was some discussion on this recently in
their user forum:

http://sourceforge.net/mailarchive/f...forum_id=33405

Darren

Tim Henderson wrote:

我想在python中动态生成一个可显示的图形在网页上。最好的方法是什么?

我想这样做的原因是因为我正在制作一个程序来将数据从科学探针转换成网页。我已经能够做除了图代之外的所有事情。

你的帮助会非常受欢迎

---
Tim Henderson
Hi
I want to dynamically generate a graph in python that would be
displayable on a web page. What would be the best way to do this?

The reason I want to do this, is because I am making a program to
convert data from scientic probes into web pages. I have been able to
do every thing except the graph generation.

Your help would be much appriciated

---
Tim Henderson






2004-09-30,Tim Henderson< ti ****** @ gmail.com>写道:
On 2004-09-30, Tim Henderson <ti******@gmail.com> wrote:
我想在python中动态生成一个可以在网页上显示的图形。最好的方法是什么?


我会使用gnuplot-py:

http://gnuplot-py.sourceforge.net/

我想这样做的原因是因为我正在制作一个程序
将科学探针中的数据转换为网页。我已经能够完成除图形生成之外的所有事情。
I want to dynamically generate a graph in python that would be
displayable on a web page. What would be the best way to do this?
I''d use gnuplot-py:

http://gnuplot-py.sourceforge.net/
The reason I want to do this, is because I am making a program
to convert data from scientic probes into web pages. I have
been able to do every thing except the graph generation.




gnuplot可以生成大量不同的文件格式,

包括png,svg,eps,pdf,ppm,gif等等。


-

Grant Edwards grante哇!我将购买JELL-O并购买
并带上我的

visi.com婚姻手册!!



gnuplot can generate a huge number of different file formats,
including png, svg, eps, pdf, ppm, gif, and so on.

--
Grant Edwards grante Yow! I will SHAVE and
at buy JELL-O and bring my
visi.com MARRIAGE MANUAL!!


这篇关于用Python动态生成图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆