generated from mwc/lab_scatter
1.2 KiB
1.2 KiB
Planning the scatter plot
- from turtle import *
- Draw a scatter plot.
- Draw the axes.
- Draw the x-axis.
- Draw the horizontal line.
- Draw 6 ticks (short dashed lines) touching beneath the baseline of x-axis at minimum to maximum location points "14 100 200 300 400 492" evenly spaced across at every 100.
- Name x axis labels "14 100 200 300 400 492" centered underneath the x axis ticks.
- Draw the y-axis.
- Draw the vertical line.
- Draw 6 ticks (short dashed lines) touching to the left side of the y-axis line at minimum to maximum location points "-927 0 1000 2000 3000 3710" evenly spaced across at every 1,000.
- Name the y-axis labels to the left of the y axis ticks.
- Draw the x-axis.
- Plot the data points.
Creating a visualization of graph with dots representing data points at x-y locations.
- ?Determine the screen size
- Set the x-axis value ranges from 14 to 492 _ Set the y-axis value ranges from -927 to 3710
- Define the "data_points" function
- Set the dot style
- Set the dot size
- Set the dot color
- Define a scatter function to plot the "x, y" data points
- ? Set a function to show the plot
- Draw the axes.