Matplotlib Set Tick Labels

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
np.random.seed(0)
X = range(6)
y = np.random.randint(1,6,6)
X_ticklabels = list('abcdefg')
fig, ax = plt.subplots()
ax.bar(X, y)
plt.show()
fig, ax = plt.subplots()
ax.bar(X, y)
plt.xticks(X, X_ticklabels)
plt.show()