码迷,mamicode.com
首页 > 其他好文 > 详细

use matplotlib to draw scatter plot

时间:2020-02-21 20:30:28      阅读:50      评论:0      收藏:0      [点我收藏+]

标签:mon   lib   line   src   draw   atp   inf   pre   port   

There are many pionts in this kind of table.
How to do it? We can use scatter() to draw it.
Code:
import matplotlib.pyplot as plt
plt.scatter(1,4)
plt.show()
The result :
技术图片
 
 
now,we can use scatter() to draw many pionts.Just like this:
code:
import matplotlib.pyplot as plt
x=[1,2,3,4,5,6]
y=[2,4,6,8,10,11]
plt.scatter(x,y,s=50)
plt.show()
技术图片
 
 
 
 
 

use matplotlib to draw scatter plot

标签:mon   lib   line   src   draw   atp   inf   pre   port   

原文地址:https://www.cnblogs.com/guoendlesslove/p/12342633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!