介绍
这篇文章将为大家详细讲解有关python中用次要情节画多个子图的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
import matplotlib.pyplot as plt import numpy  as np , #,Some example  data 用显示 时间=x np.linspace (0, 2, *, np.pi,, 400) 时间=y np.sin (x * *, 2) , 无花果,((ax?, ax2), (ax3,大举裁员)),=,plt.subplots (2, 2) fig.suptitle (& # 39; Sharing x  per 列,,y per 行# 39;) ax1.plot (x, y) ax2.plot (x, y, * * 2, & # 39;选项卡:橙色# 39;) ax3.plot (x,, - y, & # 39;选项卡:绿色# 39;) ax4.plot (x,, - y * * 2, & # 39;选项卡:红色# 39;) , for ax  fig.get_axes拷贝(): ax.label_outer ()
import matplotlib.pyplot as plt , plt.figure () plt.subplot (211) plt.plot (t1, Satarc) , plt.subplot (212) plt.plot (t2,信噪比)
关于python中用次要情节画多个子图的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看的到。