matplotlib绘图
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绘图的更多相关文章
- matplotlib 绘图
http://blog.csdn.net/jkhere/article/details/9324823 都打一遍 5 matplotlib-绘制精美的图表 matplotlib 是python最著名的 ...
- python实战学习之matplotlib绘图续
学习完matplotlib绘图可以设置的属性,还需要学习一下除了折线图以外其他类型的图如直方图,条形图,散点图等,matplotlib还支持更多的图,具体细节可以参考官方文档:https://matp ...
- matplotlib绘图的基本操作
转自:Laumians博客园 更简明易懂看Matplotlib Python 画图教程 (莫烦Python)_演讲•公开课_科技_bilibili_哔哩哔哩 https://www.bilibili. ...
- python中利用matplotlib绘图可视化知识归纳
python中利用matplotlib绘图可视化知识归纳: (1)matplotlib图标正常显示中文 import matplotlib.pyplot as plt plt.rcParams['fo ...
- matplotlib绘图基本用法-转自(http://blog.csdn.net/mao19931004/article/details/51915016)
本文转载自http://blog.csdn.net/mao19931004/article/details/51915016 <!DOCTYPE html PUBLIC "-//W3C ...
- python实战学习之matplotlib绘图
matplotlib 是最流行的Python底层绘图库,主要做数据可视化图表 可以将数据可视化,能够更直观的呈现数据 matplotlib绘图基本要点 首先实现一个简单的绘图 # 导入pyplot f ...
- 【原】在Matplotlib绘图中添加Latex风格公式
Matplotlib绘图的过程中,可以为各个轴的Label,图像的Title.Legend等元素添加Latex风格的公式. 只需要在Latex公式的文本前后各增加一个$符号,Matplotlib就可以 ...
- Matplotlib绘图双纵坐标轴设置及控制设置时间格式
双y轴坐标轴图 今天利用matplotlib绘图,想要完成一个双坐标格式的图. fig=plt.figure(figsize=(20,15)) ax1=fig.add_subplot(111) ax1 ...
- ssh调用matplotlib绘图报错RuntimeError: Invalid DISPLAY variable
1.问题:在本地用matplotlib绘图可以,但是在ssh远程绘图的时候会报错 RuntimeError: Invalid DISPLAY variable 2.原因:matplotlib的默认ba ...
- Matplotlib绘图及动画总结
目录 Matplotlib绘图总结 绘图原理 block模式(python默认) interactive模式(ipython模式默认) 深入子图 子图表示 子图绘图 绘制动画 参考链接 Matplot ...
随机推荐
- [转]Qt状态栏(statusbar)的使用
状态栏显示的信息分3种 1. 一般信息,用QLabel 代表 2. 永久信息,文本会一直显示在状态栏的最右边. 3. 临时信息,指定信息现实的时间.时间到即信息消失 QLabel *locationL ...
- Intel CPU 漏洞分析
Intel CPU漏洞分析报告 预备知识 存储分级 由于计算机存储分级的特性(第一级:寄存器,第二级:高速缓存,第三级:内存,第四级:磁盘),每一级之间的访问速度差距高达数量级.所以处理器会将用到的数 ...
- 看不懂霍尔效应的直接看视频https://www.bilibili.com/video/av11446173/
霍尔效应: 有些手机带有皮盖,就是皮盖打开的时候手机自动亮屏,皮盖和上的时候手机自动黑屏,利用的就是霍尔传感器,其实皮盖里面就是有个小磁铁而已: 当然了霍尔效应的电压也就几个毫伏,很小,所以得放大才能 ...
- linux下打包压缩和解压命令
.tar 压缩:tar cvf FileName.tar FileName 解压:tar xvf FileName.tar .gz解压1:gunzip FileName.gz解压2:gzip -d F ...
- android ImageLoader加载本地图片的工具类
import android.widget.ImageView; import com.nostra13.universalimageloader.core.ImageLoader; /** * 异步 ...
- 在 Virtual Box 安装 Mac Os 并安装 Qt 开发应用
导读 由于 Beslyric-for-X 项目开发需要,开始尝试在 Mac Os 下开发 Qt 应用.尝试成功后,记录于此,希望对有类似需求的人有所帮助. 本文以开发 Beslyric-for-X 为 ...
- linux下比较两个文件:diff、 vimdiff
diff更加具体的命令,比如file1, file2 > diff -u file1 file2 > vimdiff file1 file2 vimdiff 有点类似于 vim - ...
- NOI.ac #8 小w、小j和小z LIS
传送门 题意:在一个数轴上,给出$N$个人的初始位置与速度(速度有方向),求最大的时间使得存在$N-K$个人在这一段时间内两两没有相遇.$1 \leq K \leq N \leq 10^5$ 显然有二 ...
- CRC---循环冗余校验
typedef unsigned char uchar; typedef unsigned int uint; typedef unsigned short uInt16; uint crc; // ...
- springmvc 解决 controller 中出现死循环并 stackoverflow 的问题
这是因为这个controller中的方法返回值为void类型,且没有request response这类衍生的重定向,或者返回值为String,但是是null等等的情况,都会引起死循环,然后stack ...