感觉自己写的挺麻烦的,期待有简单的回答
import matplotlib.pyplot as plt
fig = plt.figure(figsize = (10, 10))
with plt.rc_context({'axes.edgecolor': 'white', 'xtick.color': 'white', 'ytick.color': 'white'}):
ax_main = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax_main.set_xlabel('xlabel')
ax_main.set_ylabel('ylabel')
ax1 = fig.add_axes([0.15, 0.15, 0.3, 0.3])
ax2 = fig.add_axes([0.55, 0.15, 0.3, 0.3])
ax3 = fig.add_axes([0.15, 0.55, 0.3, 0.3])
ax4 = fig.add_axes([0.55, 0.55, 0.3, 0.3])
plt.show()