Python Scatter Plot with Labels
plt.scatterPractice

Dots plus a title and axis labels

Press Run to drop each point, then attach title / xlabel / ylabel — the labels turn raw dots into a story.

Picture this: labeled scatter

Each pair is a dot. Labels explain the axes.

x, ypoints
→
scatterdots
→
title/labelsstory

In easy words

Scatter plots show relationship, not sequence. Labels are required so a reader knows what x and y mean.

Where this is used

Height vs weight, advertising vs sales, model error vs size.

Run algorithm

Each step highlights the matching Python line. Program output appears only when a line that prints actually runs.

Ready
1import matplotlib.pyplot as plt
2x = [1,2,3,4,5]
3y = [5,3,6,2,7]
4plt.scatter(x, y)
5plt.title("Sample Scatter")
6plt.xlabel("X")
7plt.ylabel("Y")
8plt.show()
Output:

Example Program

1import matplotlib.pyplot as plt
2x = [1,2,3,4,5]
3y = [5,3,6,2,7]
4plt.scatter(x, y)
5plt.title("Sample Scatter")
6plt.xlabel("X")
7plt.ylabel("Y")
8plt.show()