This is my chart, and as you can see the legend title, it says “Ratingaddtional_col_for_hover” (which is supposed to be just “Rating”) and I do not have that name of the column in any of my dataframe. I’m assuming Plotly generated for some reason? And now I’m trying to change the title of this, I’m not able to do so.
I tried using fig.update_layout(legend_title_text='Rating') but it did not work…
How can I change the title and why do I get “Ratingadditional_col_for_hover”?
As a rule, when you are defining a figure, via plotly express, inspect fig.data and fig.layout (by running print(fig.data) respectively print(fig.layout)) to see and decide how some data and/or layout attributes should be updated.