plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

color_discrete_map in px.pie() should require color argument

Open krystianMoras opened this issue 3 years ago • 0 comments

Modified example from tutorial :

df = px.data.tips()
fig = px.pie(df, values='tip', names='day',
             color_discrete_map={'Thur':'lightcyan',
                                 'Fri':'cyan',
                                 'Sat':'royalblue',
                                 'Sun':'darkblue'})
fig.show()

will not color the pie chart according to values specified in color_discrete_map. If the variable is not used in any way (unless I'm unaware of some hidden mechanism), user should be notified with a warning or an error that 'color_discrete_map' will not be used because 'color' argument was not specified.

krystianMoras avatar Jun 05 '22 08:06 krystianMoras