Screen Link:
https://app.dataquest.io/m/143/multiple-plots/11/final-tweaks
My Code:
fig = plt.figure(figsize=(10,6))
colors = ['red', 'blue', 'green', 'orange', 'black']
for i in range(5):
start_index = i*12
end_index = (i+1)*12
subset = unrate[start_index:end_index]
label = str(1948 + i)
plt.plot(subset['MONTH'], subset['VALUE'], c=colors[i], label=label)
plt.legend(loc='upper left')
plt.xlabel("Month, Integer")
plt.ylabel("Unemployment Rate, Percent")
plt.title("Monthly Unemployment Trends, 1948-1952")
plt.show()
What I expected to happen:
I expected my answer is accepted and I move on.
What actually happened:
My answer was not accepted, the message was “Your plot does not match what we expected”
Replace this line with the output/error
For whatever reason the system says my plot is not what was expected. But please see the screenshot of the two plots and maybe there is a difference that I do not see?
I have compared the answer with my code and they are identical.
If anyone can explain me what I am doing wrong here, your help is much appreciated. Thank you!