I have a Plotly animation with a colorscale and associated colorbar. What I want to do is fix the range of the colorbar and prevent it being rescaled on every frame. What I want to see is where my data is โinโ or 'out of predefined specification but this doesnโt work with autoscale working on every frame.
Animated plot
figA = px.scatter(dfAnime, x="Easting", y="Northing", animation_frame="shot",
color='Depth',range_x=[np.min(dfAnime['Easting']),np.max(dfAnime['Easting'])],
range_y=[np.min(dfAnime['Northing']),np.max(dfAnime['Northing'])],
color_continuous_scale=[(0,'red'),(0.33,'orange'),(0.58,'green'),(0.83,'orange'),(1,'red')],
range_color=[0,-6])
figA.layout.updatemenus[0].buttons[0].args[1]["frame"]["duration"]=100 # Turns off play/stop button
figA.update_yaxes(
scaleanchor="x",
scaleratio=1,
exponentformat='none')
figA.update_xaxes(
scaleanchor="x",
scaleratio=1,
exponentformat='none')
figA.update_layout(template="plotly_dark",title="Line "+str(name),autoscale=False)
#figA.show()
figA.write_html("C:/Users/client1/Desktop/anime.html")
Iโd like to fix my range between 0 and -6 (these are the extremes Iโm likely to see). I thought Iโd done that in the code above but I assume Autoscale is overriding it.