python3.3+numpy+matplotlib 实现绘图

来源:互联网 发布:同学聚会 不想去 知乎 编辑:程序博客网 时间:2024/05/22 15:32

找资源找了很久,全部打包到了我的资源库里了

配置其实很简单:

step1:

安装numpy

step2:

安装matplotlib,安装之后再安装pyparsing和dateutil

step3:

测试输入:import matplotlib 

发现出错缺少six

step4:

解压six-1.8.0.tar.gz  把six.py文件复制到C:\Python33\Lib\site-packages(我的安装路径是C:\python33 可以适合调整)

step5:

测试通过


import matplotlibfrom numpy  import arrayimport matplotlib.pyplot as pltfig = plt.figure()ax = fig.add_subplot(111)DataX =[1,2,3,4,5,6,7]DataY =[7,6,5,4,3,2,1]ax.scatter(DataX,DataY,15.0*array(DataX),15.0*array(DataY))plt.show()
<img src="http://img.blog.csdn.net/20141117102323064?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvb011WWVKaW5nRmVuZzE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />



0 1
原创粉丝点击