I am trying to plot an animation of heatmaps with plotly
and I want them to have the same legend range. Is there an easy way to do that, similar to setting vmin/vmax
range in Seaborn
?
# this works in seaborn
ax = sns.heatmap(data[0], vmin = vmin, vmax = vmax)
# my plotly code
figure = {
'data': [trace],
'layout': {},
'frames': frames
}
在跟踪(在这种情况下不显示,但我假设你正在使用graph_objs.Heatmap
或graph_objs.Heatmapgl
),你应该能够设置参数zmin
和zmax
,具有相同的行为vmin
和vmax
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.