如何在子图中制作wspace和hspace?我有以下类型的代码:
plt.figure(figsize=(12,10))
fig1=plt.subplot(231)
plt.plot(x,y)
fig2=plt.subplot(232)
plt.plot(x,y)
fig3=plt.subplot(233)
plt.plot(x,y)
fig4=plt.subplot(234)
plt.plot(x,y)
fig5=plt.subplot(235)
plt.plot(x,y)
fig6=plt.subplot(236)
plt.plot(x,y)
我试图为单个数字扩大wspace:
plt.figure(figsize=(12,10))
fig1=plt.subplot(231)
fig1.subplots_adjust(wspace=2)
错误:
fig1.subplots_adjust(wspace=2)
AttributeError: 'AxesSubplot' object has no attribute 'subplots_adjust'
以及如何更改所有轴的宽度?
我尝试过:
import matplotlib as mpl
mpl.rcParams['lines.linewidth'] = 2