Tell us what’s happening:
I was able to recreate the plot as shown in the example. I also got all the tags and labels to appear in the plot. For some reason, my barplot tests keep failing. The 3 errors always start with “‘numpy.ndarray’ object has no attribute …”. Any pointers are greatly appreciated. Thanks
Your code so far
‘’’
# Copy and modify data for monthly bar plot
df_bar = df
df_bar["month"] = df.index.month_name()
df_bar["year"] = df.index.year
# Draw bar plot
fig = sns.catplot(x='year', y='value', hue='month', data=df_bar, kind='bar',
legend_out=False, palette="bright",
hue_order=['January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October',
'November', 'December'],
ci=None)
fig.set(xlabel="Years")
fig.set(ylabel = "Average Page View")
fig.add_legend(title="Months", label_order=['January', 'February', 'March',
'April', 'May', 'June', 'July',
'August', 'September', 'October',
'November', 'December'])
# Save image and return fig (don't change this part)
fig.savefig('bar_plot.png')
return fig
‘’’
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.
Challenge: Page View Time Series Visualizer
Link to the challenge: