x = mdates.drange(dt.datetime(2012, 1, 1), dt.datetime(2013, 1, 1), dt.
    timedelta(weeks=2))
y = np.linspace(1, 10, 20)
data = np.random.random((y.size, x.size))
fig = plt.figure()
ax = fig.add_subplot(111)
qmesh = ax.pcolormesh(x, y, data)
fig.colorbar(qmesh, ax=ax)
ax.axis('tight')
ax.xaxis_date()
fig.autofmt_xdate()
plt.show()
Dates along x-axis of quadmesh