The code seems to be correct but still isn't accepted by the platform

Screen Link:
https://app.dataquest.io/m/145/histograms-and-box-plots/5/comparing-histograms

My Code:

fig = plt.figure(figsize=(5,20))
ax1 = fig.add_subplot(4,1,1)
ax2 = fig.add_subplot(4,1,2)
ax3 = fig.add_subplot(4,1,3)
ax4 = fig.add_subplot(4,1,4)

ax1.hist(norm_reviews['Fandango_Ratingvalue'],bins=20,range=(0,5))
ax1.set_title("Distribution of Fandango Ratings")
ax1.set_ylim(0,50)

ax2.hist(norm_reviews['RT_user_norm'],bins=20,range=(0,5))
ax2.set_title("Distribution of Rotten Tomatoes Ratings")
ax2.set_ylim(0,50)

ax3.hist(norm_reviews['Metacritic_user_nom'],bins=20,range=(0,5))
ax3.set_title("Distribution of IMDB Ratings")
ax3.set_ylim(0,50)

ax4.hist(norm_reviews['IMDB_norm'],bins=20,range=(0,5))
ax4.set_title("Distribution of IMDB Ratings")
ax4.set_ylim(0,50)

plt.show()

What I expected to happen:
I expect that the output should be matched with the platform’s output but it shows error.

What actually happened:

Your 1st plot doesn't match what we expected.

Kindly check once if this is an issue with the platform (any bug) or some error in my code only.

You have set the same title for two of your plots - Distribution of IMDB Ratings.

Fixing that should allow you to pass the grader.

2 Likes