1. fig = plt.figure()
  2. ax=plt.gca()
  3.  
  4. timeList = np.array(timeList)
  5. timeList=timeList*100
  6. timeList1 = np.array(timeList1)
  7. timeList1=timeList1*100
  8. timeList2 = np.array(timeList2)
  9. timeList2=timeList2*100
  10. timeList3 = np.array(timeList3)
  11. timeList3=timeList3*100
  12. timeList4 = np.array(timeList4)
  13. timeList4=timeList4*100
  14. plt.plot(timeList,"go-",label="ratio-threshold=%d"%(threValue))
  15. plt.plot(timeList1,"bs-",label="ratio-threshold=%d"%(threValue1))
  16. plt.plot(timeList2,"r^-",label="ratio-threshold=%d"%(threValue2))
  17. plt.plot(timeList3,"kp-",label="ratio-threshold=%d"%(threValue3))
  18. plt.plot(timeList4,"m+-",label="ratio-threshold=%d"%(threValue4))
  19. plt.yticks([0,2,4,6,8,10,12],['0%', '2%', '4%', '6%', '8%','10%', '12%'])
  20. for label in ax.get_xticklabels():
  21. label.set_rotation(90)
  22. plt.xlabel("time axis")
  23. plt.ylabel("ratio")
  24. plt.title(r"Among 3/25-3/26 period")
  25. plt.legend()
  26. plt.show()
  1. plt.plot(t1,"k--")
  2. plt.plot(t2,"k--")
  3. plt.plot(t3,"k--")
  4. plt.plot(t4,"k--")
  5. plt.plot(t5,"k--")
  6. plt.annotate('25%', xy=(60, 10), xytext=(63, 12),arrowprops=dict(facecolor='black', shrink=0.05),)
  7. plt.annotate('18%', xy=(60, 25), xytext=(63, 27),arrowprops=dict(facecolor='black', shrink=0.1),)
  8. plt.annotate('13%', xy=(60, 50), xytext=(63, 52),arrowprops=dict(facecolor='black', shrink=0.1),)
  9. plt.annotate('9%', xy=(60, 75), xytext=(63, 77),arrowprops=dict(facecolor='black', shrink=0.1),)
  10. plt.annotate('8%', xy=(60, 100), xytext=(63, 102),arrowprops=dict(facecolor='black', shrink=0.1),)
  11. plt.annotate('', xy=(0, 10), xytext=(-2, 12),)
  12. plt.annotate('', xy=(0, 25), xytext=(-2, 27),)
  13. plt.annotate('', xy=(0, 50), xytext=(-2, 52),)
  14. plt.annotate('', xy=(0, 75), xytext=(-2, 77),)
  15. plt.annotate('', xy=(0, 100), xytext=(-2, 102),)

matplotlib绘图的更多相关文章

  1. matplotlib 绘图

    http://blog.csdn.net/jkhere/article/details/9324823 都打一遍 5 matplotlib-绘制精美的图表 matplotlib 是python最著名的 ...

  2. python实战学习之matplotlib绘图续

    学习完matplotlib绘图可以设置的属性,还需要学习一下除了折线图以外其他类型的图如直方图,条形图,散点图等,matplotlib还支持更多的图,具体细节可以参考官方文档:https://matp ...

  3. matplotlib绘图的基本操作

    转自:Laumians博客园 更简明易懂看Matplotlib Python 画图教程 (莫烦Python)_演讲•公开课_科技_bilibili_哔哩哔哩 https://www.bilibili. ...

  4. python中利用matplotlib绘图可视化知识归纳

    python中利用matplotlib绘图可视化知识归纳: (1)matplotlib图标正常显示中文 import matplotlib.pyplot as plt plt.rcParams['fo ...

  5. matplotlib绘图基本用法-转自(http://blog.csdn.net/mao19931004/article/details/51915016)

    本文转载自http://blog.csdn.net/mao19931004/article/details/51915016 <!DOCTYPE html PUBLIC "-//W3C ...

  6. python实战学习之matplotlib绘图

    matplotlib 是最流行的Python底层绘图库,主要做数据可视化图表 可以将数据可视化,能够更直观的呈现数据 matplotlib绘图基本要点 首先实现一个简单的绘图 # 导入pyplot f ...

  7. 【原】在Matplotlib绘图中添加Latex风格公式

    Matplotlib绘图的过程中,可以为各个轴的Label,图像的Title.Legend等元素添加Latex风格的公式. 只需要在Latex公式的文本前后各增加一个$符号,Matplotlib就可以 ...

  8. Matplotlib绘图双纵坐标轴设置及控制设置时间格式

    双y轴坐标轴图 今天利用matplotlib绘图,想要完成一个双坐标格式的图. fig=plt.figure(figsize=(20,15)) ax1=fig.add_subplot(111) ax1 ...

  9. ssh调用matplotlib绘图报错RuntimeError: Invalid DISPLAY variable

    1.问题:在本地用matplotlib绘图可以,但是在ssh远程绘图的时候会报错 RuntimeError: Invalid DISPLAY variable 2.原因:matplotlib的默认ba ...

  10. Matplotlib绘图及动画总结

    目录 Matplotlib绘图总结 绘图原理 block模式(python默认) interactive模式(ipython模式默认) 深入子图 子图表示 子图绘图 绘制动画 参考链接 Matplot ...

随机推荐

  1. 使用RMAN Active duplicate创建异地auxiliary Database

    1g的RMAN duplicate 可以通过Active database duplicate和Backup-based duplicate两种方法实现.这里的测试使用的是Active databas ...

  2. 分布式缓存技术redis系列(三)——redis高级应用(主从、事务与锁、持久化)

    上文<详细讲解redis数据结构(内存模型)以及常用命令>介绍了redis的数据类型以及常用命令,本文我们来学习下redis的一些高级特性. 安全性设置 设置客户端操作秘密 redis安装 ...

  3. AliOS-Things Visual studio code helloworld 入门

    配置环境的时候别忘了下载:GCC工具链:https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads AliOS Thing ...

  4. 3分钟学会做智能插座(DIY)

    转载请注明:@小五义http://www.cnblogs.com/xiaowuyiQQ群:64770604 感谢博达科技提供的技术支持,博达科技新出了turnip智能插座,通过微信控制,实现了语音控制 ...

  5. ImageView android:scaleType="centerCrop"

    转载地址:http://www.cnblogs.com/yejiurui/archive/2013/02/25/2931767.html 在网上查了好多资料,大致都雷同,大家都是互相抄袭的,看着很费劲 ...

  6. 关于x210开发板和主机、虚拟机ping通问题

    关于x210开发板和主机.虚拟机ping通问题: 步骤: 1.关闭 Ubuntu.关闭VMware软件: 2.打开 网络连接,设置 以太网 IP地址,并确认使用的网卡 3.以管理员身份打开VMware ...

  7. Linux系列教程(四)——Linux常用命令之文件和目录处理命令

    这个系列教程的前面我们讲解了如何安装Linux系统,以及学习Linux系统的一些方法.那么从这篇博客开始,我们就正式进入Linux命令的学习.学习命令,首先要跟大家纠正的一点就是,我们不需要记住每一条 ...

  8. java json字符串传递给 js 时 特殊字符转义错误 研究

    一些换行 回车等符号需要转义 主要注意 单引号 与双引号. 一 如果js以 双引号接收字符串 则转单引号 "  至 \" 否则js报错 二 如果js以 单引号接收字符串 则转单引号 ...

  9. EF性能优化-有人说EF性能低,我想说:EF确实不如ADO.NET

    十年河东,十年河西,莫欺少年穷. EF就如同那个少年,ADO.NET则是一位壮年.毕竟ADO.NET出生在EF之前,而EF所走的路属于应用ADO.NET. 也就是说:你所写的LINQ查询,最后还是要转 ...

  10. Luogu P3327 [SDOI2015]约数个数和

    又是恶心的莫比乌斯反演,蒟蒻我又是一脸懵逼的被CXR dalao狂虐. 题目要求\(ans=\sum_{i=1}^n \sum_{j=1}^m d(ij)\),其中\(d(ij)\)表示数\(x\)的 ...