Why have none of my answers accepted in plotting exercises? 148-7

Screen Link: https://paste.pics/9PWO0

My Code:

fig = plt.figure(figsize=(18, 3))

for sp in range(0,6):
    ax = fig.add_subplot(1,6,sp+1)
    ax.plot(women_degrees['Year'], women_degrees[stem_cats[sp]], c=cb_dark_blue, label='Women', linewidth=3)
    ax.plot(women_degrees['Year'], 100-women_degrees[stem_cats[sp]], c=cb_orange, label='Men', linewidth=3)
    for key,spine in ax.spines.items():
    ax.set_xlim(1968, 2011)
    ax.tick_params(bottom="off", top="off", left="off", right="off")
    if sp == 0:
    elif sp == 5:

What I expected to happen:
I expected my answer to go through as it is identical to the solution in the original code and had been mostly prefilled.

What actually happened:
It told me that it did not match although the output was identical and so was the code. If you look at the screenshot I took of the provided answer it has all this unnecessary code in the beginning and it seems that every mission in the plotting and visualising data missions have had the same problem.

I have been really enjoying Dataquest up to this point but it seems ridiculous that I have to paste the provided answer into the code box each time to progress through a lesson even when I have provided the correct answer. This has happened over 10 times in the data visualisation section and nowhere else and the only obvious difference is that the provided answer code contains the original code and then the solution, separated by a comment.

Output :
Your 1st plot doesn’t match what we expected.

Hello @nick.creed98, welcome to the community.

This is not the screen link. Could you post the screen link?


Is that what you mean by ‘screen link’?


Hi @nick.creed98,

Yes, that’s the screen link.

Sorry about that. Unfortunately, this issue is affecting all mission screens if the initial code contains a plotting code. I have reported it to our engineering team.


1 Like

Thanks for looking into it!

1 Like