【发布时间】:2016-05-19 09:27:23
【问题描述】:
我看到以下示例来绘制图像和颜色图:
代码:
imgplot = plt.imshow(lum_img)
plt.colorbar()
从这里:http://matplotlib.org/users/image_tutorial.html
但是当我从控制台执行此操作时,我得到:
即图像立即显示,不等待第二个命令,第二个命令后出现以下错误:
RuntimeError: 找不到可用于创建颜色条的可映射对象。首先定义一个可映射对象,例如图像(使用 imshow)或轮廓集(使用 contourf)。
【问题讨论】:
标签: python matplotlib plot jupyter qtconsole