在matplotlib中将colorbar显示为log probability scale

2024-09-30 05:19:27 发布

您现在位置:Python中文网/ 问答频道 /正文

ColorMatlab正在用ploti显示概率。所以我用了下面的代码。在

hist2d(x, y, bins=50, cmap=plt.cm.cool, alpha=0.75)
colorbar()

或者

^{pr2}$

但是,我找不到正确的。我可以告诉你我想要什么。在

enter image description here

该图由matlab生成。(不是我的)颜色条显示的是对数概率。如何在matplotlib中执行此操作?在

附言:

这个代码

^{pr2}$

生成

enter image description here


Tags: 代码alpha颜色cmplt概率cmapmatlab

热门问题