Scatter Plot

PHOTO EMBED

Tue Nov 19 2024 02:50:42 GMT+0000 (Coordinated Universal Time)

Saved by @login123

#6. Scatter Plot
#Scatter plots are used to visualize relationships between two variables.
# Example: Scatter plot of Sales vs. Profit
profit = [4000, 6000, 7000, 3000, 5000, 8000]

plt.scatter(sales, profit, color='green')
plt.title("Sales vs. Profit")
plt.xlabel("Sales ($)")
plt.ylabel("Profit ($)")
plt.show()
content_copyCOPY