python - python中具有3个数组(x,y和值)的2D直方图
问题描述
我有3个数组(位置x,y和这个点的值(F)。F数组的值从负数到正数(例如-10,10)。我做了二维直方图,但是,如你所见,背景颜色为黄色。我需要颜色最低的背景。我使用的代码
h=np.histogram2d(x,y, bins=80, weights = F)
plt.figure(figsize=(5, 4), dpi=200)
plt.axes(facecolor = 'grey')
plt.imshow(h[0], extent=[-5, 5, -5, 5], origin = "lower", cmap='hot',
interpolation="gaussian")
plt.colorbar()
也许我做错了一切?因为我必须在中心区域有 F 数组的最大值请帮助!)
解决方案
推荐阅读
- linq - 如何比较 IEnumerable
在 Linq 查询中为 null - box2d - Farseer/Box2D:BuoyancyController:将其设为多边形或圆形(矩形除外)?
- scipy - 如何在 MIMO 系统中使用 scipy 信号
- r - 更改列的数字元素的值
- rust - 此错误消息是否意味着我可以在 for 循环中使用模式匹配?
- matlab - Matlab 3dplot函数绘制正弦变化频率和时间的幅度
- python - Matplotlib subplot2grid 无法正常工作
- ldap - 引起:org.springframework.ldap.AuthenticationException:[LDAP:错误代码 49 - 80090308:
- php - Laravel 验证或
- java - 通过套接字将 JTable 数据从服务器发送到客户端 JTable