Adding a Reset Button

Hi All!

Working to find a solution in adding a reset button to this activity. Students are to construct a scatterplot by clicking. I’m going to try and figure out how to add in the correlation later. but right now I’m wondering on any solutions to adding a reset button either as a clickable option, or as an action button.

I’m thinking that the clickable option is not going to work because I am capturing the current X and Y of the cursor and it will add in a sketch every time I click.

I love how you have them add points to the graph, that’s really cool!

I added a “reset” image to the graph and was able to get a reset button working just by forcing the x-value of the point to be -100 (off the screen) if the mouse was ever over the “reset” image. This involved making an intermediary variable X_p which acts as the new X-value of the point. This makes sure the point gets out of the cursor’s way when it’s hovering over the reset button.

Here’s the modified Amplify activity

And here’s the graph itself that I used (should just be able to paste the link into one of the cells of your activity’s graph if you want to directly

Reset Button | Desmos