plotly.py
plotly.py copied to clipboard
color_discrete_map in px.pie() should require color argument
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.