I have a dataset being plotted.
One function is a line graph and the other is a bar, the points on the line graph represent each value in the dataset, see below:
As you can see the bar graph is missing values after every group of 3. See code below:
fig, ax = plt.subplots()
ax.bar(dat_dat,full_anom,width=0.1)
ax.plot(dat_dat, full_anom, marker = 'o')
every_nth = 40
for n, label in enumerate(ax.xaxis.get_ticklabels()):
if n % every_nth != 0:
label.set_visible(False)
ax.set_title('Full West Coast SST Anomalies')
plt.savefig('Full West Coast SST Anomalies')
plt.show()
plt.close()
full_anom is just a list of values and dat_dat is just a list of the dates please help. Thanks