Line Plot
Tue Nov 19 2024 02:48:15 GMT+0000 (Coordinated Universal Time)
Saved by
@login123
#data visulization
#1. Line Plot
#Line plots are used to visualize data points over time.
import matplotlib.pyplot as plt
# Example: Line plot for Sales over months
months = ["January", "February", "March", "April",
"May", "June"]
sales = [12000, 15000, 17000, 13000, 16000, 19000]
plt.plot(months, sales, marker='*')
plt.title("Sales Over Time")
plt.xlabel("Month")
plt.ylabel("Sales ($)")
plt.show()
content_copyCOPY
Comments