Error “unknown property denSity”

I have been doing pro data scientist path and have accomplished 95%.
I am stucked in Visualizing categorical data - Introduction to bar charts - Unknown property error.
Can any one help please???
my code:
import codecademylib3

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

add in your answers here!

left_plot = “Bar Chart”

right_plot =“Histogram”

heroes_data = pd.read_csv(“heroes_information.csv”)

line of code used to clean up messy data

heroes_data_cleaned = heroes_data[heroes_data.Alignment != “-”]

code for left plot

plt.subplot(1, 2, 1)


code for right plot

plt.subplot(1, 2, 2)

sns.distplot(heroes_data_cleaned[“Height”], kde=False)


Error details in output:

Traceback (most recent call last):
File “”, line 20, in
sns.distplot(heroes_data_cleaned[“Height”], kde=False)
File “/usr/local/lib/python3.6/dist-packages/seaborn/”, line 2619, in distplot
color=hist_color, **hist_kws)
File “/usr/local/lib/python3.6/dist-packages/matplotlib/”, line 1898, in inner
return func(ax, *args, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/matplotlib/axes/”, line 6389, in hist
File “/usr/local/lib/python3.6/dist-packages/matplotlib/”, line 885, in update
for k, v in props.items()]
File “/usr/local/lib/python3.6/dist-packages/matplotlib/”, line 885, in

Could you please check the FAQ at the given link and follow the guidance on formatting code and linking to the project/lesson in question. It’s hard for others to assist without this.

I just created a ticket and reported this bug.

See this other thread:

1 Like

Thank you very much for such efficient response.

It worked.