8
使用熊貓在I-Python Notebook中進行繪圖,我有幾個繪圖,而且由於Matplotlib決定Y軸的設置不同,我們需要使用相同的範圍來比較這些數據。 我已經嘗試了幾種變體:(我假設我需要將限制應用到每個plot ..但是因爲我無法獲得一個工作...從Matplotlib文檔看來,我需要設置ylim,但想不通的語法這樣做。使用熊貓在Matplotlib中設置Y軸
df2250.plot(); plt.ylim((100000,500000)) <<<< if I insert the ; I get int not callable and if I leave it out I get invalid syntax. anyhow, neither is right...
df2260.plot()
df5.plot()
完美,太謝謝你了! – dartdog
您也可以將'sharey = True'添加到'plt.subplots'。然後,即使在放大某個特定的子圖上時,y限制也會保持不變。 – esmit
確實,好點! –