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