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()
 
现在试试绘制更多的点,代码如下:
import matplotlib.pyplot as plt
x_values=list(range(1,1001))
y_valuse=[x**2 for x in x_values]
plt.scatter(x_values,y_valuse,s=40)
plt.axis([0,1100,0,1100000])#参数从左向右含义一次是:横坐标的起始点、横坐标的最大值,纵坐标的起始点,纵坐标的最大值
plt.show()
绘制效果如下图所示:
 

最新文章

  1. MVC中使用[ValidateAntiForgeryToken]防止CSRF 注入攻击
  2. c# 支付宝查单补单
  3. @Entity设置OneToMany
  4. Event Delivery: The Responder Chain(事件传递,响应链)
  5. AVAudioPlayer音频播放器-备用
  6. mysqli连接数据库函数
  7. powerdesigner反向MySQL5.1数据库 生成ER图
  8. ubuntu16.04搭建ftp服务器
  9. 4.5管道实现机制和模拟构建管道「深入浅出ASP.NET Core系列」
  10. MT【311】三角递推数列
  11. 修改OBS为仅直播音频
  12. openLayers 4 canvas图例绘制,canvas循环添加图片,解决图片闪烁问题
  13. 利用for循环如何判定是水仙花数
  14. js函数前加分号和感叹号是什么意思?有什么用?
  15. linux nc命令使用详解(转)
  16. 二叉树的java实现
  17. 本地oracle的配置连接
  18. (java基础)抽象类加泛型的理解
  19. Python的函数一
  20. Android——Activity的生命周期

热门文章

  1. 初探网络流:dinic/EK算法学习笔记
  2. 题解 P3950 【部落冲突】
  3. redis之Set(有序)类型常用方法总结
  4. mysql遇到java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
  5. ajax Ajax处理下载文件response没有反应
  6. Eclipse - 常见问题 - Refresh
  7. 「CF286C」Main Sequence
  8. 图的数据结构的实现与遍历(DFS,BFS)
  9. 阿里云服务器win2003下iis整合tomcat共享80端口
  10. Socket传输大文件(发送与接收)