Plots are not as expected

Screen Link:
https://app.dataquest.io/m/147/improving-plot-aesthetics/7/hiding-spines

My Code:

fig, ax = plt.subplots()
ax.plot(women_degrees['Year'], women_degrees['Biology'], c='blue', label='Women')
ax.plot(women_degrees['Year'], 100-women_degrees['Biology'], c='green', label='Men')
ax.tick_params(bottom="off", top="off", left="off", right="off")
# Add your code here
for key,spine in ax.spines.items():
    spine.set_visible(False)

ax.legend(loc='upper right')
ax.set_title('Percentage of Biology Degrees Awarded By Gender')
plt.show()

What I expected to happen:

Proceed

What actually happened:

Answer is not as expected

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

4 Likes

looks identical to me :thinking:

try this?:

fig, ax = plt.subplots()
ax.plot(women_degrees['Year'], women_degrees['Biology'], c='blue', label='Women')
ax.plot(women_degrees['Year'], 100-women_degrees['Biology'], c='green', label='Men')
ax.tick_params(bottom="off", top="off", left="off", right="off")
# Start
for key,spine in ax.spines.items():
    spine.set_visible(False)
ax.set_title('Percentage of Biology Degrees Awarded By Gender')
ax.legend(loc='upper right')
plt.show()

Hi @m.frias,

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.

Best,
Sahil

1 Like

Hi All,

We have fixed this issue for missions 147 and 148 by commenting out the initial codes in the solution. If you are experiencing this issue in any other mission, let me know. :slightly_smiling_face:

Best,
Sahil