[英]How to fix matplotlib's subplots when the entire layout can not be filled?
我想繪制一個包含29列的DataFrame,所以我使用matplotlib的“ subplots”命令,該命令使用5x6布局,(5x6 = 30> 29)
無花果,ax = plt.subplots(5,6)
但是,當我繪制所有列時,最后一個子圖(即row = 5,col = 6)為空,因為那里沒有數據可顯示。 有沒有辦法刪除最后一個子圖?
嘗試這個
fig.delaxes(axs[5,6])
plt.show()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.