I’m using pio.show(pie_fig) to plot my pie_fig. My version of plotly is 4.5.0. but color_discrete_map and opacity are not working when I use the documentation examples here:
df = px.data.tips()
fig = px.pie(df, values='tip', names='day', color='day',
color_discrete_map={'Thur':'lightcyan',
'Fri':'cyan',
'Sat':'royalblue',
'Sun':'darkblue'})
pio.show(fig)
The colors don’t change. I get the default colors. And in…
df = px.data.tips()
fig = px.pie(df, values='tip', names='day', opacity=0.4, color_discrete_sequence=px.colors.sequential.RdBu)
pio.show(fig)
opacity raises this error:
ValueError: Invalid property specified for object of type plotly.graph_objs.pie.Marker: ‘opacity’
Valid properties:
colors…
colorssrc…
line…
Is this a bug or am I going crazy?