如何使第6个子图(axs [1,2])消失?我尝试了plt.patches.Rectangle
,但没有显示。安排这5个图的任何其他替代方式也将受到赞赏,但只是想知道是否有可能在不更改许多当前代码的情况下实现它。
import seaborn as sns
sns.set(style="ticks")
fig, axs = plt.subplots(nrows = 2, ncols = 3, figsize = (12, 8))
list = [a, b, c, d, e]
ax1 = sns.barplot(y = list[0], x = "Period", data = xxx, ax = axs[0, 0])
ax2 = sns.barplot(y = list[1], x = "Period", data = xxx, ax = axs[0, 1])
ax3 = sns.barplot(y = list[2], x = "Period", data = xxx, ax = axs[0, 2])
ax4 = sns.barplot(y = list[3], x = "Period", data = xxx, ax = axs[1, 0])
ax5 = sns.barplot(y = list[4], x = "Period", data = xxx, ax = axs[1, 1])
plt.subplots_adjust(wspace = 0.5)