generated from mwc/lab_scatter
51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# Planning the scatter plot
|
|
|
|
# 9.12.2023_Watched the video "August 2_Scatter plot lab live-coding"
|
|
# ??? Was my pseudocode ok, going into it in more detail?
|
|
|
|
# My pseudocode here, below is your pseudocode from video
|
|
- 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.
|
|
- 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.
|
|
|
|
# Your pseudocode from video
|
|
- from turtle import *
|
|
- Draw a scappter plot.
|
|
- Draw the axes.
|
|
- Draw the x-axis.
|
|
- Draw the line.
|
|
- Figure out where the ticks should go
|
|
- For each tick,
|
|
- Draw the tick.
|
|
- Draw the y-axis.
|
|
- Draw the line.
|
|
- Figure out where the ticks should go
|
|
- For each tick,
|
|
- Draw the tick.
|
|
- Plot the points.
|
|
- For each point,
|
|
- Draw the point at the appropriate location.
|
|
|
|
|
|
|