Python matplotlib contour plot logarithmic color scale

亡梦爱人 提交于 2019-12-03 12:08:46

So it's easily fixed; your order of levels means that the lowest level gets drawn last and therefore covered everything! Try:

axim    = ax.contourf(X,Y,Z,levels=[1e-3, 1e-2, 1e-1, 1e0],cmap=plt.cm.jet,norm = LogNorm())

instead and you should get the desired result.

It looks like levels expects increasing values. Try changing them to: levels=[1e-3, 1e-2, 1e-1, 1e0] and see if that solves your issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!