|      1cdwyd      2014-07-28 18:06:59 +08:00 这个不是js干的活吗? | 
|  |      2izoabr      2014-07-28 18:11:47 +08:00 你是非得在后台生成图片再输出么?还是也能接受js来做?最好是用js做,方便得多 | 
|  |      3solu      2014-07-28 18:20:59 +08:00  1 交给js做吧,百度就有个 https://github.com/ecomfe/echarts | 
|  |      4reeco      2014-07-28 18:41:49 +08:00 Echarts、highchart | 
|  |      6imn1      2014-07-28 19:18:39 +08:00 json,似乎是输出到web,楼上介绍的都不错了,另外的选择可以是SVG 如果只是单机输出,Matplotlib库虽大,但结合pandas输出其实也是很简单,你这个需求在pandas调用matplotlib也就两三行代码而已 | 
|  |      7d0o0g      2014-07-28 20:33:50 +08:00 gnuplot | 
|  |      8susu      2014-07-28 21:36:09 +08:00 chart.js  挺好的用的。 http://www.bootcss.com/p/chart.js/ | 
|  |      9iptux      2014-07-28 21:42:53 +08:00 maxima 的 plot2d() 和 plot3d() 也很好用 | 
|      10yangzh      2014-07-28 22:14:56 +08:00 这个 pandas 正解 | 
|  |      11Niris      2014-07-28 23:04:39 +08:00 | 
|  |      12ruoyu0088      2014-07-29 06:03:31 +08:00 matplotlib是很大很复杂,但是用起来不复杂,你那个图4,5行代码就可以画出来了。 | 
|  |      13frankzeng      2014-07-29 08:51:26 +08:00 chartdirector,这个强大,后台生成的,楼上一干人说用js画图,数据多的时候不好使。 | 
|      14dcoder      2014-07-29 09:34:20 +08:00 @solupro 百度这个很赞啊,有现成的 angular directive 吗,找了下,没找到. 看样子是不依赖任何外部 lib 的? https://github.com/ecomfe/echarts/blob/master/bower.json | 
|  |      17hao1032 OP 测试代码 import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.ylabel('some numbers') plt.show() | 
|  |      18clino      2014-07-29 11:08:53 +08:00 建议楼主去 https://pypi.python.org/pypi 搜索一下 chart 这样去找找 | 
|  |      19likuku      2014-07-29 11:25:47 +08:00 gnuplot 足够。 python 根据数据生成 gnuplot 的临时配置文件,然后调用 gnuplot 计算文本数据源,生成图片。 gnuplot 参考: gnuplot 让您的数据可视化 : http://www.ibm.com/developerworks/cn/linux/l-gnuplot/ 台湾中央研究院计算中心 ASPAC 计划 的 gnuplot 中文文档: Gnuplot User Guide : http://dsec.pku.edu.cn/dsectest/dsec_cn/gnuplot/ | 
|  |      20Hualin      2014-07-29 14:52:14 +08:00 Matplotlib 很复杂,但用其中的命令风格模块 pyplot 就够用了。基本上就在命令行敲敲命令就能出图。很简单,官网有个 tutorial 以及几个简练的 demo Matplotlib 推荐安装 numpy (定义 array 或者 matrix), scipy (用不上 备着),以及 ipython(interactive Python cmd)。 iPython 集成了 numpy 和 matplotlib.pyplot 用的时候不用导入那些模块。matplotlib 的 pyplot 教程也是基于此。 windows 下 直接安装以上几个 python 包的 binary 就 ok,环境变量设置一下,没啥折腾的。 | 
|  |      21Hualin      2014-07-29 14:58:30 +08:00 windows 64 bit,可以选择直接安装 64 bit python,但注意要在 unofficial site 上安装已经预先编译的其他包的 64bit 版,去这个网站 http://www.lfd.uci.edu/~gohlke/pythonlibs/。 你报错可能是底层用的库不对。像 numpy 这种包 不同于 pypi 上其他小的包,需要底层的数学库来支持,不折腾的话就之间安装 binary,get things done 就行 | 
|      22y26jin      2014-07-30 03:12:00 +08:00 试试plotly  https://plot.ly/ | 
|  |      23d0o0g      2014-08-11 22:21:38 +08:00 | 
|  |      24hao1032 OP | 
|  |      25hao1032 OP 近期发现了 pycha 这个包,是一个比较简单的 chart 库,有需要的的可以试试。 http://pythonhosted.org/pycha/ |