Attempting to access the length of a matplotlib axis label with this code:
for label in ax.xaxis.get_ticklabels()[1::2]:
print(len(label))
However I am getting an error that the object does not have a length attribute. print(label[2]) also errors out with a similar error.