I'm trying to plot some data into a chart, I'd like for the 'Months' axis to have 'January', 'Feburuary' etc. instead of integers. However if I enter text for this parameter, I get the following error:
NameError: name 'Months' is not defined
Here's my code:
import matplotlib.pyplot as plt
Months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
position = [0, 100, 200, 300, 2,2,2,2,2,2,2,2]
plt.plot(Months, position)
plt.xlabel('Time (hr)')
plt.ylabel('Position (km)')
Is there a way of putting static text in here instead of integers?

