Time for action – draw the x and y axis of the grid
Right now, the graph looks out of place. Let's draw some reference points to the graph starting with the X and Y axes:
Use the paint new sprite option to draw a small square sprite, and name it grid. You can use any color you want, but I'm using black.
Let's draw the X axis first. From the Motion palette, add the go to x: and y: block. Set our original X and Y coordinates (-200, -140).
From the Pen palette, add the set pen color to block and select black as the color.
From the pen palette, add the pen down block.
From the Motion palette, add the change x by block and set the value to 320. We'll build the graph 20 pixels bigger than we expect to use.
From the Pen palette, add the pen up block.
Next, we need to draw the Y axis. We can use the same block of code with a couple of slight alterations. Duplicate the existing blocks and append it to the script.
Since we want to draw the Y axis, we need to swap out the second change x by block with a change...