仅记录
1. 问题描述:
想设置每个子图的大小
2. 实现代码:
fig, (axes1, axes2) = plt.subplots(2, 1, figsize=(100, 10))
axes1.plot(np.arange(time_length), np.zeros(time_length))
axes2.plot(np.arange(time_length), np.zeros(time_length))
3. 直接Ctrl+B看plt.subplot的注释讲解,比网上大多数讲的清楚

本文介绍了一种在Matplotlib中设置子图大小的方法,通过使用subplots函数的figsize参数来调整整个画布的大小,并展示了如何绘制两个子图的例子。
2416

被折叠的 条评论
为什么被折叠?



