Hello all, I am new to plotly. I am using it through python. I am trying to figure out a way to make legend off a third column. For example,
x y Category
5 25 Squared
2 4 Squared
3 27 Cube
4 16 Squared
then, I want a scatter plot of x vs y with legend as category. I group my dataframe based on category and then loop through the different groups but I think there should be a better way to do this.
This does give me different legends but all categories have the first color in my colorscale. So I tried,
but this does nothing. Is there a way to map the colorscale with respect to the category column and then do the same thing as above? Or is there a better way to do this? Can someone please help?