matplotlib2.02基本画图
来源:互联网 发布:丹爷辣椒酱淘宝 编辑:程序博客网 时间:2024/05/29 17:31
最近在使用matplotlib画图,最基本的内容
散点中的marker
marker description
“.” point
“,” pixel
“o” circle
“v” triangle_down
“^” triangle_up
“<” triangle_left
“>” triangle_right
“1” tri_down
“2” tri_up
“3” tri_left
“4” tri_right
“8” octagon
“s” square
“p” pentagon
“P” plus (filled)
“*” star
“h” hexagon1
“H” hexagon2
“+” plus
“x” x
“X” x (filled)
“D” diamond
“d” thin_diamond
“|” vline
“_” hline
线条形状linestyle
linestyle description
‘-’ or ‘solid’ solid line
‘–’ or ‘dashed’ dashed line
‘-.’ or ‘dashdot’ dash-dotted line
‘:’ or ‘dotted’ dotted line
‘None’ draw nothing
’ ’ draw nothing
” draw nothing
颜色
绘制最基本的图
#coding:utf-8"""python 3matplotlib 2.02"""import numpy as npimport matplotlib.pyplot as pltnp.random.seed(1) #随机种子x = np.linspace(0,1,100)noise = np.random.normal(0,0.1,100)y = 2*x + noiseplt.figure(1)plt.plot(x,y,linestyle='--',lw=2,c='c',label='test') #linestyle表示线条形状plt.legend(loc='best')plt.title('this is for matplotlib2.02 test')plt.grid(True)plt.figure(2)x1 = np.random.normal(1,1,300)x2 = np.random.normal(5,1,300)y1 = np.random.normal(1,1,300)y2 = np.random.normal(5,1,300)plt.scatter(x1,y1,c='seagreen',s=60,marker='*') #marker表示散点形状plt.scatter(x2,y2,c='peru',s=60,marker='1')plt.show()
阅读全文
0 0
- matplotlib2.02基本画图
- python3下安装matplotlib2.02
- 【转】MATLAB基本画图
- gdi画图基本步骤
- matlab基本画图
- android基本画图方法
- ios基本画图
- R语言基本画图
- OpenCV基本画图功能
- matlab 画图基本介绍
- OpenGL2(画图基本操作)
- matplotlib基本画图示例
- WebApp基本画图
- Matplotlib--基本画图
- ASP 基本画图
- QT画图教程3:QT基本画图
- html5 canvas 画图基本教程
- (IOS)Quartz画图基本小记
- ajax中的timeout
- java Thread interrupt方法
- WAF绕过参考资料
- <NOIP> 6 . P1089 津津的储蓄计划
- 页面显示时间为object Object
- matplotlib2.02基本画图
- AFNetworking 的详细使用
- 各类研究数据集合
- javascript Date format(js日期格式化)
- 京东轮播图
- Java file方法的路径特性
- 页面跳转前对ToKen判断
- 【maven】单元测试
- Cocos2dx三种定时器的使用