import matplotlib.pyplot as plt
a=[[(i-j)%2 for i in range(8)] for j in range(8)]
tick_set=[0,1,2,3,4,5,6,7]
xlab=["a","b","c",'d',"e","f","g","h"]
ylab=["1","2","3","4","5","6","7","8"]
plt.imshow(a,cmap='gray',origin="lower",)
plt.xticks(ticks=tick_set,labels=xlab)
plt.yticks(ticks=tick_set,labels=ylab)
plt.show()