python绘制折线图示例
2016-04-27 09:52
651 查看
绘制结果:
python代码:
Matplotlib是python著名的绘图库,可用来绘制很多高质量的图表,大家可通过其官网给的例程深入学习:http://matplotlib.org/gallery.html
python代码:
import numpy as np import pylab as pl x = [1, 2, 3, 4, 5] # Make an array of x values y = [1, 4, 9, 16, 25] # Make an array of y values for each x value pl.plot(x, y) # use pylab to plot x and y pl.show() # show the plot on the screen
Matplotlib是python著名的绘图库,可用来绘制很多高质量的图表,大家可通过其官网给的例程深入学习:http://matplotlib.org/gallery.html
相关文章推荐
- Python实现二维有序数组查找的方法
- python学习2
- 《python+opencv学习》一、Gui Features in Opencv(2)Matplotlib显示图片
- python安装numpy模块
- Python 基础 —— pylab
- Python数组遍历的简单实现方法小结
- numpy 辨异(一) —— reshape 与 resize
- Python的“二维”字典 (two-dimension dictionary)定义与实现方法
- python实现欧拉计划第十一题
- Python单链表简单实现代码
- 21天学通Python笔记(一)
- python使用matplotlib绘图
- 使用Python分析谷歌浏览器Chrome的网页浏览历史记录
- windows下python开发环境搭建(python+pip+aptana studio)
- windows下安装xgboost numpy scipy scikit-learn matplotlib
- python-json模块简单使用
- python 的重定向输出到一个文件
- Python单链表简单实现代码
- Python的“二维”字典 (two-dimension dictionary)定义与实现方法
- Python数组遍历的简单实现方法小结