I've created a script that displays 3 lines in a single line graph data points across 53 weeks. The graph works and labels display, but they're overcrowded. Does anyone know how to enumerate the annotate/data labels so only the even weeks display data labels? Below is my problem:
import pandas as pd
import matplotlib.pyplot as plt
CA_plot_df = CA_Data.pivot_table('ED Arrivals', ['W'], 'Year').reset_index()
CA_plot_df = CA_plot_df[1:-1]
df_2021 = CA_plot_df[['W',2021]].dropna()[:-1]
plt.style.use('ggplot')
plt.rcParams['axes.facecolor'] = 'white'
fig = plt.figure(figsize = (15,8))
ax = fig.add_subplot(111)
plt.plot(CA_plot_df.W, CA_plot_df[2019], label = 'year 2019', color = '#407c38', linewidth = 2)
for i,j in zip(CA_plot_df.W,CA_plot_df[2019]):
ax.annotate('%s' %round(j), xy=(i,j), xytext=(-2,5), textcoords='offset points')
plt.plot(CA_plot_df.W, CA_plot_df[2020], label = 'year 2020', color = '#b3b3b3', linewidth = 2)
plt.plot(df_2021.W, df_2021[2021], label = 'year 2021',color = '#d64550', linewidth = 2)
for i,j in zip(df_2021.W,df_2021[2021]):
ax.annotate('%s' %round(j), xy=(i,j), xytext=(-2,5), textcoords='offset points')

