I've found other topics similar to this, but I'm finding anything that works specifically for me, so I'm wondering what I'm doing wrong.
I've got the following code:
# Plot weather vs. # of accidents on grouped-bar-chart for each year
data_chart = dataset2.plot.bar()
data_chart.set_xlabel('Weather Condition')
data_chart.set_ylabel('No. of Accidents')
data_chart.set_title('Annual Number of Accidents per Weather Condition')
I've tried using the two following bits of code to increase the size of my chart:
data_chart.plot(figsize=(10,5))
plt.figure(figsize=[10,5])
but neither of them have worked.
Thank you for your help!
fig, ax = plt.subplots(figsize=(10,5)),dataset2.plot.bar(ax=ax).plt.figure(figsize=[10,5])after you created the plot just creates a new plot.NameError: name 'ax' is not defined.Do I need to import something special to use ax?