简体   繁体   中英

Setting Plotly Heatmap Range

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.Heatmapgraph_objs.Heatmapgl ),你应该能够设置参数zminzmax ,具有相同的行为vminvmax

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM