I'm trying to make a histogram with two columns and name the labels, but I don't understand how to align the labels with the columns.
Here is the code (months
is the dataset I'm trying to plot):
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
fig, ax = plt.subplots()
fig.set_figheight(6)
fig.set_figwidth(10)
plt.hist(months, bins=2,edgecolor='k', align='left')
ax.set_xticks(np.arange(2),['start of the year','end of the year'])
plt.title('birthdates of the players')
plt.xlabel('birthdate')
plt.ylabel('frequency')
plt.show()