【发布时间】:2013-03-24 16:39:36
【问题描述】:
如何使用matplotlib.pyplot 在python 中创建计数网格,其中网格是z 变量低于零的一种颜色,而z 等于或大于零时的另一种颜色?我对matplotlib 不是很熟悉,所以如果有人能给我一个简单的方法,那就太好了。
到目前为止我有:
x= np.arange(0,361)
y= np.arange(0,91)
X,Y = np.meshgrid(x,y)
area = funcarea(L,D,H,W,X,Y) #L,D,H and W are all constants defined elsewhere.
plt.figure()
plt.contourf(X,Y,area)
plt.show()
【问题讨论】:
-
你使用的是哪个版本的python(2或3)
标签: python matplotlib contour