Я хочу построить фигуру с xticks
, начиная, например, с 50
до 100
.
Что я пробовал до сих пор:
data_to_plot = data[-90:] # 90 datapoints
# Create figure
fig = plt.figure()
ax = fig.add_subplot(111)
# Plot the value
ax.plot(data_to_plot/S)
# Set the ticks
x_ticks = np.arange(50, 140)
ax.set_xticks(x_ticks)
# Limits
plt.ylim(0, 1)
# Naming
plt.title("Cooperation")
plt.xlabel("Round")
plt.ylabel("Value")
plt.show()
И вот что я получаю, это цифра:

Вместо фигуры с xticks начинаяот 50
до 140
, т. е. список [50, 60, 70, ..., 130, 140] для меток в значках.
Использование: Python 3, Matplotlib 3.0.2, MacOS 10.13.