<jupyter_start><jupyter_text>Let's try to graph the hits by year for <NAME><jupyter_code>import matplotlib.pyplot as plt
from matplotlib.dates import YearLocator, MonthLocator, DateFormatter

y1  = [5, 129, 195, 215, 176, 150, 212, 175, 109, 166, 144, 107, 184, 128, 124, 180, 129, 179, 129, 169, 149]
x = [1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993]
plt.plot(x, y1, label="Hits")
plt.plot()

plt.xlabel("Year")
plt.ylabel("Count")
plt.title("George Brett stats by year (carrer)")
plt.legend()
plt.show()<jupyter_output><empty_output><jupyter_text>Well that turned out poorly right? The year did not display right at all. Let's fix that<jupyter_code>import matplotlib.pyplot as plt

years1_string = ["1973", "1974", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993"]
years2_string = ["1973", "1974", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993"]

years1 = [int(i) for i in years1_string]
scores1  = [5, 129, 195, 215, 176, 150, 212, 175, 109, 166, 144, 107, 184, 128, 124, 180, 129, 179, 129, 169, 149]

years2 = [int(i) for i in years2_string]
scores2  = [0, 2, 11, 7, 22, 9, 23, 24, 6, 21, 25, 13, 30, 16, 22, 24, 12, 14, 10, 7, 19]

fig, ax = plt.subplots(1)
ax.set_xlim(1973,1993)
ax.set_xticks([1973, 1975, 1977, 1979, 1981, 1983, 1985, 1987, 1989, 1991, 1993])
ax.scatter(years1, scores1, c='r', edgecolor=None, label = 'Hits')
ax.scatter(years2, scores2, c='b', edgecolor=None, label = 'Home Runs')
plt.title("George Brett stats by year hits vs. home runs")
ax.legend()
fig.show()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup