0
我對兩種情況做了一個循環,對於每種情況,我嘗試做一個情節。如何用matplotlib繪製多個圖像?
for col_name in ['col2','col3']:
x_min = min(df['col1'].min(), df[col_name].min())
x_max = max(df['col1'].max(), df[col_name].max())
plt.xlim([x_min,x_max])
plt.ylim([x_min,x_max])
plt.axes().set_aspect('equal')
plt.scatter(df['col1'], df[col_name])
結果我得到了我的IPython的筆記本一個情節。有誰知道如何克服這個問題?
見http://stackoverflow.com/questions/14254379/how-can-i-attach-a-pyplot-function-to-a-figure-instance/14261698#14261698。您正在使用狀態機界面,您可能想要使用OO界面。 – tacaswell