【Python】Matplotlib画图(四)——折线图
2017-09-04 17:28
92 查看
环境
PythonMac OS
代码
# coding:utf-8 """ Author: roguesir Date: 2017/8/30 GitHub: https://roguesir.github.com Blog: http://blog.csdn.net/roguesir """ import numpy as np import matplotlib.pyplot as plt x1=[20,33,51,79,101,121,132,145,162,182,203,219,232,243,256,270,287,310,325] y1=[49,48,48,48,48,87,106,123,155,191,233,261,278,284,297,307,341,319,341] x2=[31,52,73,92,101,112,126,140,153,175,186,196,215,230,240,270,288,300] y2=[48,48,48,48,49,89,162,237,302,378,443,472,522,597,628,661,690,702] x3=[30,50,70,90,105,114,128,137,147,159,170,180,190,200,210,230,243,259,284,297,311] y3=[48,48,48,48,66,173,351,472,586,712,804,899,994,1094,1198,1360,1458,1578,1734,1797,1892] x=np.arange(20,350) l1=plt.plot(x1,y1,'r--',label='type1') l2=plt.plot(x2,y2,'g--',label='type2') l3=plt.plot(x3,y3,'b--',label='type3') plt.plot(x1,y1,'ro-',x2,y2,'g+-',x3,y3,'b^-') plt.title('The Lasers in Three Conditions') plt.xlabel('row') plt.ylabel('column') plt.legend() plt.show()
画图
相关文章推荐
- python.matplotlib/datatime/CSV学习范例-读取CSV格式文件生成折线图
- Python进阶(三十八)-数据可视化の利用matplotlib 进行折线图,直方图和饼图的绘制
- Python读取Excel表格,并同时画折线图和柱状图的方法
- python 画图--简单开始及折线图
- Python3 使用 matplotlib 画折线图
- python 数据可视化 matplotlib学习二 : 对折线图使用颜色映射
- python使用matplotlib模块绘制多条折线图、散点图
- 利用python进行折线图,直方图和饼图的绘制
- python使用matplotlib画图
- 使用python的matplotlib画图
- Python数据分析之——数据可视化(折线图)
- Python数据可视化:Matplotlib 直方图、箱线图、条形图、热图、折线图、散点图。。。
- 利用python画出折线图
- Python数据可视化之散点图和折线图
- python数据处理(csv->折线图)
- Python点滴(三)—pandas数据分析与matplotlib画图
- python作有关日期和数据的折线图
- [置顶] 利用python进行折线图,直方图和饼图的绘制
- python 绘图---2D、3D散点图、折线图、曲面图
- python数据分析——matplotlib生成折线图,散点图和直方图