fig = plt.figure()
ax=plt.gca() timeList = np.array(timeList)
timeList=timeList*100
timeList1 = np.array(timeList1)
timeList1=timeList1*100
timeList2 = np.array(timeList2)
timeList2=timeList2*100
timeList3 = np.array(timeList3)
timeList3=timeList3*100
timeList4 = np.array(timeList4)
timeList4=timeList4*100
plt.plot(timeList,"go-",label="ratio-threshold=%d"%(threValue))
plt.plot(timeList1,"bs-",label="ratio-threshold=%d"%(threValue1))
plt.plot(timeList2,"r^-",label="ratio-threshold=%d"%(threValue2))
plt.plot(timeList3,"kp-",label="ratio-threshold=%d"%(threValue3))
plt.plot(timeList4,"m+-",label="ratio-threshold=%d"%(threValue4))
plt.yticks([0,2,4,6,8,10,12],['0%', '2%', '4%', '6%', '8%','10%', '12%'])
for label in ax.get_xticklabels():
label.set_rotation(90)
plt.xlabel("time axis")
plt.ylabel("ratio")
plt.title(r"Among 3/25-3/26 period")
plt.legend()
plt.show()
plt.plot(t1,"k--")
plt.plot(t2,"k--")
plt.plot(t3,"k--")
plt.plot(t4,"k--")
plt.plot(t5,"k--")
plt.annotate('25%', xy=(60, 10), xytext=(63, 12),arrowprops=dict(facecolor='black', shrink=0.05),)
plt.annotate('18%', xy=(60, 25), xytext=(63, 27),arrowprops=dict(facecolor='black', shrink=0.1),)
plt.annotate('13%', xy=(60, 50), xytext=(63, 52),arrowprops=dict(facecolor='black', shrink=0.1),)
plt.annotate('9%', xy=(60, 75), xytext=(63, 77),arrowprops=dict(facecolor='black', shrink=0.1),)
plt.annotate('8%', xy=(60, 100), xytext=(63, 102),arrowprops=dict(facecolor='black', shrink=0.1),)
plt.annotate('', xy=(0, 10), xytext=(-2, 12),)
plt.annotate('', xy=(0, 25), xytext=(-2, 27),)
plt.annotate('', xy=(0, 50), xytext=(-2, 52),)
plt.annotate('', xy=(0, 75), xytext=(-2, 77),)
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. matlab的conv2、imfilter、filter2

    1 conv2函数 C=conv2(A,B,shape); %卷积滤波 参数说明: A:输入图像 B:卷积核 shape的可选值为full.same.valid. 1)当shape=full时,返回全 ...

  2. 20175310 《Java程序设计》第3周学习总结

    20175310<Java程序设计>第3周学习总结 教材学习内容总结 本周学习了第四章的内容,相比前三章来说,第四章内容较多而且比较复杂,花了大量的时间学习.学习的主要内容如下: 类.方法 ...

  3. Linux内核poll内部实现

    前言 poll机制用于实现IO多路复用.所谓IO多路复用,通俗的讲,其实就是线程复用,使其能在一个线程上处理多个IO. 用户空间 用户通过调用用户空间的poll函数使用该机制. 驱动部分的实现 用户如 ...

  4. alios-things makefile

    https://blog.csdn.net/crazyskady/article/details/80849765 MAKEFILE下面这句:CFLAGS=-I/home/develop/includ ...

  5. MySQL(五)汇总和分组数据

    一.汇总数据 工作中经常需要汇总数据而不是将它们全部检索出来(实际数据本身:返回实际数据是对时间和处理资源的浪费),这种类型的检索有以下特点: ①确定表中的行数(或者满足某个条件或包含某个特定值的行数 ...

  6. java 之UDP编程

    大白话:每一台电脑都有自己的ip地址,向指定的ip地址发数据,数据就发送到了指定的电脑.UDP通信只是一种通信方式而已,其特点就不多说.有了ip地址数据就能发送到指定的电脑了,但是呢!我把数据发送到电 ...

  7. sql语句,查询昨天的数据

    如果在程序中,有前台传来两个时间点:beginTime和endTime,在sql查询中的限制条件就是查询昨天的数据,那么可以这样写: 但是如果在这里要查询昨天的数据的话, 则不能简单地在开始时间的那里 ...

  8. LiveCharts文档-3开始-3类型和设置

    原文:LiveCharts文档-3开始-3类型和设置 LiveCharts文档-3开始-3类型和设置 类型和设置 这一部分非常的重要,涉及到LiveCharts的基本构成单元的介绍 LiveChart ...

  9. C# WPF DataGrid 分组(Group)

    原文:C# WPF DataGrid 分组(Group) 效果如图,每个列的名字可以自定义.我随便用了”File”和”Attachment Name”.  在Window的Resources里面设置S ...

  10. 查看CentOS/Linux的版本信息

    今天在安装MySql的时候,想选择linux的版本对应的MySql. 1.查看内核版本和x86/x64版本 方法一.cat /proc/version [root@sxl129 Desktop]# c ...