【发布时间】:2022-01-05 11:57:14
【问题描述】:
我想要一个等高线图,显示对应于一组特定 x,y 的等高线水平。我尝试增加等高线的数量,但它没有给出所需点附近的等高线。
我想在(0.1,0.1) 附近获得一条等高线,但我无法这样做,我尝试增加等高线的数量,但 matplotlib 没有在所需点附近绘制它,我也不知道等高线的水平接近那个点。
khmax = np.arange(0,0.5,0.001)
Ncmax = np.arange(0,0.5,0.001)
[X, Y] = np.meshgrid(Ncmax,khmax)
fig, ax = plt.subplots()
contour = plt.contour(X,Y,VgN,50)
ax.set_title('magnitude of VgN/c')
ax.set_xlabel('Ncmax')
ax.set_ylabel('khmax')
ax.clabel(contour, inline= True, inline_spacing = -1,fmt = '%1.8f',fontsize=8)
plt.show()
这不是完整的代码。非常感谢任何形式的帮助或提示。
【问题讨论】:
标签: python numpy matplotlib seaborn contour