Suppose I have a simple plot set up in matplotlib:
fig, ax = plt.subplots(1,1)
p=ax.plot([1,2,3,4,5], [10,9,8,7,6])
How could I add a tick to the x-axis at the value 1.5 with the label "here is 1.5"?
I understand that I could use plt.xticks()
, but then I would need to specify all ticks and labels.