To fix the problem with matplotlib in some of coursera assignments with AttributeError: 'Polygon' object has no property 'normed' we just need to chage normed=True with density=True That's all you need.
This worked thanks