plotly - 使用 plotly express 热图更改颜色条的位置
问题描述
我想更改颜色条的位置以使其更靠近热图。有任何想法吗?
我的代码:
data = heatmapData
fig3 = px.imshow(data,
labels=dict(x="Mois de l'année", y="Types de Pollens", color="Grains moyen par m3"),
x=['Février','Mars', 'Avril' ,'Mai' , 'Juin' ,'Juillet' ,'Août', 'Septembre'],
y=['Aulne', 'Ambroisie', 'Armoise', 'Bouleau', 'Charme', 'Châtaignier',
'Noisetier', 'Cupressacées', 'Hêtre',
'Frêne', 'Graminées', 'Mûrier',
'Olivier', 'Plantain', 'Platane', 'Peuplier', 'Chêne', 'Oseille',
'Saule', 'Tilleul', 'Urticacées'],
color_continuous_scale = "tempo",
)
fig3.update_xaxes(side="top")
fig3.update_layout(width=1000, height=600)
fig3.show()
解决方案
推荐阅读
- sql-server - 参数化 SQL 存储过程 Excel Get&Transform
- php - RewriteCond 查询字符串以清除 URL
- php - 旧 mysql 函数的 PDO 等价物,如 fetch assoc
- python - 前向选择策略 - 使用 np.arrays() 进行回归
- woocommerce - Woocommerce 添加复选框并链接到产品单页
- django - 无法迁移数据库,因为环境变量不可用
- android - android studio 屏幕关闭/锁屏
- xml - 为什么我的 xslt 选择了我没有指定的节点的子节点?
- php - 如何通过ajax发布数据然后使用查询
- javascript - 选项卡更改 HTML 时更改图像