I would like to remove the numerical values in each thick of my y-axis (10, 20, 30, etc.) but keeping the thick marks and the axis label. So far I just have:
yticks([])
but it removes the ticks as well. I also tried:
frame=gca()
frame.axes.get_yaxis().set_visible(False)
but it removes both axis label and axis ticks.
You can set the tick labels to an empty list:
from matplotlib.pyplot import *
gca().set_xticklabels(['']*10)
plot(range(10))
Results in
I had to do that before I called plot
. Not sure why the other way around didn't work