Python Matplotlib Plot在contourf或imshow上的散点图

时间:2015-03-10 16:42:29

标签: python-2.7 matplotlib

以下问题: 我有表面数据,我可以绘制为imshow或contourf,我的下一步是将np.mesgrid数组中给定的某些点绘制为contourf上的散点图。我的代码没有失败,但没有显示轮廓上的散点图

fig1=plt.figure()
#plate=plt.imshow(twi, vmin=-1, vmax=2, origin='lower',extent=[x.min(), x.max(), y.min(), y.max()], interpolation='bilinear')
plate=plt.contourf(xi,yi,twi,21,vmin=-1, vmax=2)
plt.colorbar()
plt.scatter(xx_sensor,yy_sensor,marker='o', c='b', s=5, zorder=10,lw=100)
plt.xlim(x.min(), x.max())
plt.ylim(y.min(), y.max())
plt.show()

0 个答案:

没有答案