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")我正在嘗試繪制 5 個不同的圖,但當我更改時,我不知道如何擺脫底部的行fig, axes = plt.subplots(nrows=5, ncols=5)到fig, axes = plt.subplots(nrows=1, ncols=5)我收到一條錯誤消息 IndexError:數組索引太多。提前致謝
添加回答
舉報
0/150
提交
取消