Animated scatter_geo with ranged color changes scale on every frame

Hello,

I’m trying to do animated scatter_geo, where color is linked to a continuous variable (revenue), which is changing mix/max value on every animation frame. Is it possible to lock the color range to be the same on all frames? I didn’t manage to find an option to set the same value-range for all frames.

Example:

fig = px.scatter_geo(sales_monthly, lon="lon", lat="lat", 
                     color = "Revenue",
                      size = "Revenue",
                     animation_frame="Month",
                     projection="natural earth",
                     # projection="orthographic"
                     # color_continuous_scale=px.colors.sequential.Blues
                     )
                     
fig.update_geos(fitbounds="locations", showcountries = True)
fig.show()

ezgif.com-gif-maker

I’ve finally found the parameter, it’s color-range. It’s not described in https://plotly.com/python-api-reference/generated/plotly.express.scatter_geo.html, but it works.

fig = px.scatter_geo(sales_monthly, lon="lon", lat="lat", 
                     color = "Revenue",
                     size = "Revenue",
                     animation_frame="Month",
                     animation_group ="State",
                     projection="natural earth",
                     range_color=(0, 80000)
                     # projection="orthographic"
                     # color_continuous_scale=px.colors.sequential.Blues
                     )
                     
fig.update_geos(fitbounds="locations", showcountries = True)
fig.show()

Now the range of the colors remain the same for all frames
updated_color_range