I try to make a stacked bar plot with plotly express. The only problem is that I'm not able to remove the '=' sign from 'region_txt' which I use to instantiate the variable 'color' with. Now my legend shows the '=' sign in front of the region names. Is there any way to remove this '=' sign? Our data looks partly like this:
import plotly.express as px
fig = px.bar(df_agg, x='iyear', y="count", color='region_txt',
labels={
"iyear": "Jaar",
"count": "Hoeveelheid aanslagen",
"region_txt": ""
},
title="terroristische aanslagen per jaar per regio", )
fig.update_layout(legend=dict(
yanchor="top",
y=0.99,
xanchor="left",
x=0.01,
bgcolor="rgba(0,0,0,0)",
))
fig.show()