Plotting Code not running (python)

Screen Link:

My Code:

fig = plt.figure(figsize=(5,12))

cols=["Sample_size","Median","Employed","Full_time","ShareWomen","Unemployment_rate", "Men", "Women"]

for i in range(0,8):
    ax=fig.add_subplot(8,1,i+1)
    ax=recent_grads[cols[i]].plot(kind="hist")

What actually happened:
My code does not seem to be appearing due to error. May I know why?

@lauratangwt: as per this article, please replace plt.figure with plt.figure.Figure(). Ensure that you also imported the matplotlib library correctly.

1 Like