I built the scatterplot by making the axes and plotting the points.

Checkpoint 3:
This lab went alright.  I got through most of it easy but got stuck on plotting the points.  I understand where most of the parts come together.  The thinking in checkpoint 1 was used when creating the graph in checkpoint 3.  I have no ideas for other programs I could write.
This commit is contained in:
jwberent
2025-10-06 15:25:20 -04:00
parent b9b429b39c
commit 4dcd3868a7

View File

@@ -58,9 +58,10 @@ def draw_points(data, color, size):
y_values = get_y_values(data) y_values = get_y_values(data)
xmin, xmax = bounds(x_values) xmin, xmax = bounds(x_values)
ymin, ymax = bounds(y_values) ymin, ymax = bounds(y_values)
scaled_x = scale(x_values,xmin,xmax,ymin,ymax) for x,y in data:
scaled_y = scale(y_values,xmin,xmax,ymin,ymax) scaled_x = scale(x,xmin,xmax,14,492)
draw_point(scaled_x, scaled_y, color, size) scaled_y = scale(y,ymin,ymax,-927,3710)
draw_point(scaled_x, scaled_y, color, size)
with no_delay(): with no_delay():