RootGrapefruit
RootGrapefruit

Reputation: 105

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
     }

Upvotes: 6

Views: 6646

Answers (1)

vlizana
vlizana

Reputation: 3232

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.

Upvotes: 5

Related Questions