Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到了一个二维数据数组,我想使用 pylab 将其绘制为热图。我只找到了使用法线点构建热图的解决方案,但没有找到映射f(x,y) = heat到热图的方法。
f(x,y) = heat
PS:ipython 结合 pylab 做这些事情真是太棒了:)
事实证明它相当容易:
import pylab as pl data = pl.random((25,25)) # 25x25 matrix of values pl.pcolor(data) pl.colorbar() pl.show()