I have a simple plot code as
plt.plot(x,y) plt.show()
I want to add some extra ticks on the x-axis in addition to the current ones, let\'s say
Yes, you can try something like:
plt.xticks(list(plt.xticks()[0]) + extraticks)
The function to use is xticks(). When called without arguments, it returns the current ticks. Calling it with arguments, you can set the tick positions and, optionally, labels.