I am using plotly to show an image using fig=px.imshow(img)
I would like it to have a discret legend similar to the ones in the pie chart or the bar chart: fig2 = px.pie(df, values=df[0],names=df.index,color =df.index, color_discrete_map= h.colormap)
imshow() does not have the argument color_discret_map but maybe there could be a work-around ?
I know it is possible with matplotlib but I need plotly to do it.