The scale of the color bar keeps changing in my choropleth map. I don’t know how to keep it consistent, which is essential for what I’m trying to accomplish.
This is my code for the layout:
### create the dictionary with the data for the current year
data_one_year = dict(
locations = countrylist,
autocolorscale = False,
colorscale = scl,
colorbar = dict(
title = “Temperature”,
tickvals = [0,5,10,15,20],
lenmode = ‘pixels’,
`data_slider.append(data_one_year) # I add the dictionary to the list of dictionaries for the slider
As you can see, the values on the bar to the right of the map are changing from place. How do I prevent this and make them stay in the same place?