locator = ax.xaxis.get_major_
^^^
cut and paste error -- should read
locator = ax.xaxis.get_major_locator()
JDH
locator = ax.xaxis.get_major_
^^^
cut and paste error -- should read
locator = ax.xaxis.get_major_locator()
JDH