generated from mwc/lab_scatter
o
This commit is contained in:
@@ -35,6 +35,23 @@ def draw_scatterplot(data, size=5, color="black"):
|
||||
|
||||
def draw_axes(data):
|
||||
"Draws the scatter plot's axes."
|
||||
draw_x_axis()
|
||||
xxx = get_x_values(data)
|
||||
min, max=bounds(xxx)
|
||||
ticks=get_tick_values(min,max)
|
||||
for tick in ticks:
|
||||
screen_x_position=scale (tick,min,max,0,constants.PLOT_WITH)
|
||||
|
||||
|
||||
|
||||
draw_y_axis()
|
||||
|
||||
|
||||
|
||||
|
||||
draw_x_tick()
|
||||
draw_y_tick()
|
||||
|
||||
|
||||
def draw_points(data, color, size):
|
||||
"Draws the scatter plot's points."
|
||||
@@ -44,3 +61,4 @@ with no_delay():
|
||||
draw_scatterplot(data, size=5, color="blue")
|
||||
hideturtle()
|
||||
done()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user