运行环境:

py3.6

matplotlib 2.1.2

x = [2,4,6,7,8,5,4,3]
y = [3,6,5,8,4,3,2,4]
txt = ['我','今','晚','上','吃','了','个','鲸'] import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.scatter(x, y)
for i in range(len(x)):
plt.annotate(txt[i], xy = (x[i], y[i]), xytext = (x[i]+0.1, y[i]+0.1)) # 这里xy是需要标记的坐标,xytext是对应的标签坐标
plt.show()

PS:感觉好土。。。

最新文章

  1. TransactionScope 之分布式配置
  2. Spring中ApplicationContext对事件的支持
  3. <jsp:include>和<%@ include %>的区别
  4. tomcat The file is absent or does not have execute permission
  5. [团队项目]后续安排 Github
  6. asp.net mvc NPOI 生成Excel文件
  7. SharePoint Srver 2010 资源汇总
  8. CSS position overflow float 属性 详解
  9. jvm003 类加载的过程
  10. Linux之read命令使用
  11. VueRouter和Vue生命周期(钩子函数)
  12. Python的类的下划线命名的区别
  13. js 索引数组转JSON为空
  14. [算法]Collebarative Filtering
  15. Spring错误——Spring 注解——factory-bean reference points back to the same bean definition
  16. php curl中x-www-form-urlencoded与multipart/form-data 方式 Post 提交数据详解
  17. IPC 之 Socket 的使用
  18. eclipse 远程调试mapreduce
  19. 59. 螺旋矩阵 II
  20. 实现windows操作系统和VB下Linux虚拟操作系统相互传取文件方式总结

热门文章

  1. python基础——匿名函数及递归函数
  2. POJ-1068 Parencodings---模拟括号的配对
  3. Text-文本检查
  4. Django项目实战之用户上传与访问
  5. jQuery系列 第二章 jQuery框架使用准备
  6. 确保 PHP 应用程序的安全 -- 不能违反的四条安全规则
  7. (hdu-4280)Island Transport~测试网络流模板速度~要加挂才能过啊
  8. vector数组中STL习惯性用法
  9. 多线程利器---队列(queue)
  10. linux必知必会命令