Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
310 B
1
Indexable
Never
import matplotlib.pyplot as plt

years = [1, 2, 3, 4, 5, 6, 7, 8]
sales = [102, 110, 100, 114, 132, 127, 118, 121]

plt.plot(years, sales)
plt.title("Sales Data Time Series Plot")
plt.xlabel("Years")
plt.ylabel("Sales (Rs in lakhs)")
plt.xticks([1, 2, 3, 4, 5, 6, 7, 8]) 
plt.grid(True)

plt.show()
Leave a Comment