Setting Plotly Heatmap Range

Viewed 1650

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
     }
1 Answers

In the trace (in this case is not shown but I assume you're using graph_objs.Heatmap or graph_objs.Heatmapgl) you should be able to set the parameters zmin and zmax, that have the same behavior as vmin and vmax.

Related