You can try two things:
1) It should be ax.xaxis.... not ax.yaxis....
2) Use set_major_locator() instead of set_major_formatter() for Locator. Example is shown below.
min = 15
ax.xaxis.set_major_locator(MinuteLocator(byminute=range(0,60,min)) )
ax.xaxis.set_major_formatter( DateFormatter('%H:%M') )