fig, axes = plt.subplots(nrows=1, ncols=5)data.Interest1.value_counts().plot(kind = 'bar', ax=axes[0,0], color = "rosybrown")massT5.Interest1.value_counts().plot(kind ='bar', ax=axes[0,1], color = "firebrick")scT5.Interest1.value_counts().plot(kind ='bar', ax=axes[0,2], color = "red")virgT5.Interest1.value_counts().plot(kind ='bar', ax=axes[0,3],color = "darksalmon")nyT5.Interest1.value_counts().plot(kind ='bar' , ax=axes[0,4],color = "sienna")我正在嘗試?yán)L制 5 個(gè)不同的圖,但當(dāng)我更改時(shí),我不知道如何擺脫底部的行fig, axes = plt.subplots(nrows=5, ncols=5)到fig, axes = plt.subplots(nrows=1, ncols=5)我收到一條錯(cuò)誤消息 IndexError:數(shù)組索引太多。提前致謝
如何更好地分離地塊?
三國(guó)紛爭(zhēng)
2023-10-31 14:05:01