matplot 坐标点_matplot画子图、设置坐标和标题
发布日期:2021-10-27 12:03:50 浏览次数:2 分类:技术文章

本文共 1874 字,大约阅读时间需要 6 分钟。

写一个笔记,留着以后用的时候翻着看,有些粗糙仅供参考。并推荐一个较好的博客

x=np.linspace(0,2000,2000)

plt.figure(figsize=(8,20))

plt.subplots_adjust(hspace=0.5) #调整子图间距

# Normal

ax1 = plt.subplot(10,1,1)

ax1.plot(x,Normal)

ax1.set_title('Raw vibration signal for healthy state') #设置标题

ax1.set_ylabel('Amplitude') # 设置纵轴

ax1.set_ylim(-2, 2) # 设置纵轴范围

# B007_3

ax2 = plt.subplot(10,1,2)

ax2.plot(x,B007)

ax2.set_title('Raw vibration signal for 0.007mm ball fault')

ax2.set_ylabel('Amplitude')

ax2.set_ylim(-2,2)

# B014_3

ax3 = plt.subplot(10,1,3)

ax3.plot(x,B014)

ax3.set_title('Raw vibration signal for 0.014mm ball fault')

ax3.set_ylabel('Amplitude')

ax3.set_ylim(-2,2)

# B021_3

ax4 = plt.subplot(10,1,4)

ax4.plot(x,B021)

ax4.set_title('Raw vibration signal for 0.021mm ball fault')

ax4.set_ylabel('Amplitude')

ax4.set_ylim(-2,2)

# IR007_3

ax5 = plt.subplot(10,1,5)

ax5.plot(x,IR007)

ax5.set_title('Raw vibration signal for 0.007mm inner race fault')

ax5.set_ylabel('Amplitude')

ax5.set_ylim(-2,2)

# IR014_3

ax6 = plt.subplot(10,1,6)

ax6.plot(x,IR014)

ax6.set_title('Raw vibration signal for 0.014mm inner race fault')

ax6.set_ylabel('Amplitude')

ax6.set_ylim(-2,2)

# IR021_3

ax7 = plt.subplot(10,1,7)

ax7.plot(x,IR021)

ax7.set_title('Raw vibration signal for 0.021mm inner race fault')

ax7.set_ylabel('Amplitude')

ax7.set_ylim(-2,2)

# OR007@3

ax8 = plt.subplot(10,1,8)

ax8.plot(x,OR007)

ax8.set_title('Raw vibration signal for 0.007mm centered at 6:00 outer race fault')

ax8.set_ylabel('Amplitude')

ax8.set_ylim(-2,2)

# OR014@3

ax9 = plt.subplot(10,1,9)

ax9.plot(x,OR014)

ax9.set_title('Raw vibration signal for 0.014mm centered at 6:00 outer race fault')

ax9.set_ylabel('Amplitude')

ax9.set_ylim(-2,2)

# OR021@3

ax10 = plt.subplot(10,1,10)

ax10.plot(x,OR021)

ax10.set_title('Raw vibration signal for 0.021mm centered at 6:00 outer race fault')

ax10.set_ylabel('Amplitude')

ax10.set_ylim(-2,2)

plt.show()

e0a285d08eb1

下载.png

转载地址:https://blog.csdn.net/weixin_34620658/article/details/113902934 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:MySQL查询任课老师所在系_查询数据库系统课程的任课教师。
下一篇:linux设置操作系统安装盘的iso文件为安装源安装mysql服务_Linux 操作系统安装盘的定制...

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年03月31日 17时45分07秒