estou na aula de quartis, decis e percentis. Nessa aula o professor elabora um gráfico cumulativo usando o seguinte código:
ax = sns.displot(dados.Idade,
hist_kws = {'cumulative': True},
kde_kws = {'cumulative': True})
ax.figure.set_size_inches(12, 10)
ax.set_title('Distribuição de Frequência - Idade', fontsize = 18)
ax.set_xlabel('Anos', fontsize = 14)
ax.set_ylabel('Acumulado', fontsize = 14)
ax
Mas não gera o gráfico que foi demonstrado na aula. Ele retorna um erro assim:
AttributeError Traceback (most recent call last)
/tmp/ipykernel_1049/3635761623.py in <cell line: 0>()
----> 1 ax = sns.displot(dados.Idade,
2 hist_kws = {'cumulative': True},
3 kde_kws = {'cumulative': True})
4 ax.figure.set_size_inches(12, 10)
5 ax.set_title('Distribuição de Frequência - Idade', fontsize = 18)
5 frames
/usr/local/lib/python3.12/dist-packages/matplotlib/artist.py in update_props(self, props, errfmt)
1204 func = getattr(self, f"set{k}", None)
1205 if not callable(func):
-> 1206 raise AttributeError(
1207 errfmt.format(cls=type(self), prop_name=k),
1208 name=k)
AttributeError: Rectangle.set() got an unexpected keyword argument 'hist_kws'
você poderia esclarecer por que estou enfrentando esse erro?