Skip to content
Home » AttributeError: ‘Rectangle’ object has no property ‘norm_hist’ Python Error

AttributeError: ‘Rectangle’ object has no property ‘norm_hist’ Python Error

To solve AttributeError: ‘Rectangle’ object has no property ‘norm_hist’ Python error follow below methods.

ERROR LOG

[IN]: sns.displot(iris["sepal_length"], norm_hist=True, kde=False)
[OUT]: Traceback (most recent call last):

Python - app.py", line 79, in <module>
    sns.displot(iris["sepal_length"], norm_hist=True, kde=False)

  File "C:\Users\x\anaconda3\lib\site-packages\seaborn\distributions.py", line 2227, in displot
    p.plot_univariate_histogram(**hist_kws)

AttributeError: 'Rectangle' object has no property 'norm_hist'

How to solve AttributeError: ‘Rectangle’ object has no property ‘norm_hist’ Python Error ?

According to the official documentation, displot indeed does not have the parameters you are using. so the issue is caused by unknow parameter norm_hist. you may be confused with the deprecated distplot function (here) that has it.

Check the documentation and use the right parameters

AttributeError: ‘Rectangle’ object has no property ‘norm_hist’ Python Error

I had the same error, and my solution was to change ffn/core.py . It was the first file in the error list, I see, but same principle, something must be deprecated. Now try to modify the code

from

ax = ser.hist(bins=bins, figsize=figsize, normed=True, **kwargs)

to

ax = ser.hist(bins=bins, figsize=figsize, density=True, **kwargs)

Hope the above solution works.

Also read :

Node JS is not installed on win machine
The following classes could not be found: androidx.compose.ui.tooling.preview.ComposeViewAdapter