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. undefined == false 么

    今天碰到个问题,我需要去判断 undefined == false 会返回什么,想当然的以为会返回true,但是结果却返回的是false,这我就有点晕了,不是说undefined.null.0.NaN ...

  2. 【Codeforces 1137B】Camp Schedule

    Codeforces 1137 B 题意:给两个串\(S\).\(T\),问将\(S\)中字符任意调换后出现\(T\)次数最多的方案. 思路:我们首先考虑怎么样放\(T\)才是最优的.我们直观上考虑前 ...

  3. C#中当程序的访问权限不足时,Directory.Exists和File.Exists方法不会抛出异常报错

    有些时候,我们开发的C#应用程序的执行账号,可能没有对一些文件夹和文件的访问权限,当我们使用Directory.Exists和File.Exists方法去判断这些文件夹和文件是否存在的时候,Direc ...

  4. Luogu3514 POI2011 Lollipop 递推、构造

    题目传送门:https://www.luogu.org/problemnew/show/P3514 题意:给出一个只有$1$和$2$的长度为$N$的数列,$M$次询问是否存在一段连续子区间和为$K$. ...

  5. Rabbitmq-direct演示

    在上一节中我们创建了一个日志系统.实现将日志消息广播给所有的cusumer. 在这片教程中,我们将为日志系统添加一个功能:仅仅订阅一部分消息.比如:我们可以直接将关键的错误类型日志消息保存到日志文件中 ...

  6. JS 去除重复元素的方法

    Array.prototype.del = function () { var a = {}, c = [], l = this.length; ; i < l; i++) { var b = ...

  7. Task 异步编程测试案例及基础应用说明

    对于多线程,我们经常使用的是Thread.在我们了解Task之前,如果我们要使用多核的功能可能就会自己来开线程,然而这种线程模型在.net 4.0之后被一种称为基于“任务的编程模型”所冲击,因为tas ...

  8. 微信小程序——获取用户unionId

    1.获取code 2.获取openid 3.获取access_token 4.获取unionid

  9. 关于小程序登录时获取openId和unionId走过的坑

    目前的项目是在做小程序这方面的,接触过的人应该都知道,同一个微信开放平台下的相同主体的App.公众号.小程序的unionid是相同的,这样就可以锁定是不是同一个用户.微信针对不同的用户在不同的应用下都 ...

  10. EZ 2018 06 02 NOIP2018 模拟赛(十七)

    这次的比赛是真心比较狗,我TM的写了30min的树剖ZZ地直接memset超时了 话说我既然想到差分就应该去写差分的啊! 好了不过这次Rank还挺高的,终于要打进前10了当然是假的了. 好了下面开始讲 ...