AttributeError: 'Rectangle' Object Has No Property 'Normed' Solution

created at 06-26-2021 views: 9

description

If you run your code and get the error message like bellow:

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

the thing you should know is that the library (python matplotlib) you are using has been updated (comparing to the tutorial you are following), there is no normed property any more.

solution

  • Change normed attribute in the code to density
  • then also add an attribute stacked = True

see example below:

plt.hist(data, density=True, stacked=True)
  • density=True represents the frequency distribution
  • density=False represents the probability density distribution
Please log in to leave a comment.