I am trying to put xticks in a plt figure. However, ticks start from 0 while I want to start from 1 how can I fix this? I tried this (based on a similar question I found) but still nothing.
import numpy as np
import matplotlib.pyplot as plt
y= np.array([[1], [2], [0.5], [1.4],[5], [4], [3.5], [1.2]])
plt.figure(1)
plt.plot(y, marker="o")
x_ticks = np.arange(1, len(y), 5)
plt.xticks(x_ticks)
thanks a lot!