I have list generated from a function I created. I am integrating a graph into my function output. As I am testing my graph the ticks on the x axis do not align with the correct points on the graph; they are offset by 1. The data at tick 0 should be tick 1 and so forth.
list = [0.38, 0.60, 0.65, 0.67, 0.71, 0.66, 0.65, 0.47, 0.71, 0.60]
plt.plot(list)
plt.show()
What I tried:
plt.xticks(np.arange(1, len(list)+1)
That graphs fine but still the same issue.
I just cannot seem to shift the xticks to line up with their corresponding points on the line graph. Any help is appreciated.
Matplotlib version 3.5.2 Python3 Numpy version 1.21.5 pandas 1.4.4