0
我一直在想這個永遠:當我使用plt.subplot(221)(例如)命令時,如何在Matplotlib中設置圖形來共享座標軸?與其說:Matplotlib與plyplot.subplot()命令共享座標軸?
fig, axes = plt.suplots(2,2,sharex=True, sharey=True)
我想說:
plt.subplot(221, sharex=True, sharey=True)
,這樣我就不必處理與plt.subplots回報這惱人的陣列,但顯然這是行不通。
有沒有辦法做到這一點只是使用subplot()命令? – 2015-04-04 17:36:26
我不確定,我不知道一種方法。然而在我看來,'subplots'命令會產生更簡潔的代碼。如果你有這麼多的subplots元組解開變得不可讀,我發現'axes [2,2] .plot(...)比'plt.subplot(221,sharex = True,sharey = True)好'' – cel 2015-04-05 06:34:23