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. 安装webpack和webpack打包(此文转自Henery)

    Henery博客地址为:http://blog.csdn.net/henery_002 写的很详细,可以做参考 最近要做项目优化了,尤其是前端这块,许多js需要模块化管理和相应的优化 1.输入如下地址 ...

  2. 【转】Kaggle注册问题-验证码和手机短信

    注册和登录Kaggle时验证码无法显示问题 参考:https://blog.csdn.net/zhuisaozhang1292/article/details/81529981 应用FQ软件需要时时关 ...

  3. 排列数与For的关系

    目录 什么是排列数 用现实模型表示 用Python编程表示 用数学符号表示 规律 规律1 规律2 如果m < n 会怎样? 排列数的应用场景 什么是排列数 排列指将一个集合里的每个元素不重复的排 ...

  4. flask 路由和视图

    路由设置的俩种方式 @app.route('/xxx') def index(): return 'index' ------------------------------------------ ...

  5. jmeter(四)HTTP请求

    启动jmeter,建立一个测试计划 这里再次说说怎么安装和启动jmeter吧,昨天下午又被人问到怎样安装和使用,我也是醉了:在我看来,百度能解决百分之八十的问题,特别是基础的问题... 安装:去官网下 ...

  6. Spring @Scheduled定时任务的fixedRate,fixedDelay,cron执行差异

    import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.sp ...

  7. Mybatis自动生成实体类

    Maven自动生成实体类需要的jar包 一.pom.xml中 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns ...

  8. 如何学习 Webpack

    webpack-howto Tip: 本文是 webpack-howto 的原文,我觉得这篇文章写得非常好,确实算是目前学习 webpack 入门的必读文章.直接收录之. 本教程的目标 这是一本教你如 ...

  9. 一头雾水的"Follow The Pointer"

    原文:一头雾水的"Follow The Pointer" 一头雾水的"Follow The Pointer"                           ...

  10. 通过Jekins执行bat脚本始终无法完成

    问题描述 最近在研究Devops工作流,中间有一个环节是自动发布版本的,我们使用PipeLine调用Jekins任务,最终执行bat脚本,但在执行Jekins任务的时候,任务总是完成不了,导致DBA在 ...