Renaming the items in colorbar

Hi @Jubeen welcome to the forum! If you do a print(fig) you’ll see that the figure uses a coloraxis to configure the colors, and not a colorscale associated to a trace. Therefore you should call fig.update_coloraxes instead of fig.update_traces. You can take a look at the attributes of go.layout.coloraxis.ColorBar in the reference documentation, in particular there is a ticksuffix attribute if you want to display a % symbol.

1 Like