I'm trying to do a pie chart with the following code:
import plotly.graph_objects as go
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
import locale
locale.setlocale(locale.LC_NUMERIC, "de_DE")
plt.rcParams['axes.formatter.use_locale'] = True
labs = np.array(['Desiguais', 'Dinâmicos', 'Equitativos', 'Em Transição', 'Vulneráveis'])
d_pop = np.array([43.64, 33.96, 9.84, 8, 4.55])
cols =["#C03A51FF", "#E65D2FFF", "#FA9008FF", "#F9CB35FF", "#FCFFA4FF"]
explode = np.ones(len(cols))/20
fig1, ax1 = plt.subplots(figsize=(10,8))
ax1.pie(d_pop, explode=explode, labels=labs, colors=cols, autopct='%1.1f%%',
shadow=True, startangle=90, pctdistance=0.85, textprops={'fontsize': 14});
I'm obtained the following pie chart:
But I need replace dot by comma in labels, example: 4.6% replace by 4,6%.
I appreciate any help.
