Matplotlib allows changing the alpha value of almost anything, but how does it work for an ticklabel? If I have a text, it is easy:
ax.set_xticklabel(labels, alpha=alpha)
The case is different if I do not have a text as the following throws a TypeError, due to missing labels.
ax.set_xticklabel(alpha=alpha)
Therefore, my next idea was to get the automatically generated ticklabels and use them to do the job:
labels = [label.get_text() for label in ax.get_xticklabels()]
ax.set_xticklabels(labels, alpha=alpha
The problem here is, the labels are empty due to the dynamic nature of matplotlib (see here).
So, is there an easy way to change the alpha of my ticklabels without knowing the text beforehand?