Lesson goal: Plotting functions

Previous: Graph a parabola | Home | Next: The Lorenz Attractor

Using computers to plot mathematical functions is a very common task, and is also a great way to strengthen your understanding of how functions appear and behave, without the hassle of using pencil and paper (or the small buttons on your calculator).
new_chart(x-label,y-label,chart-type)
graph_point(x,y)
Move the mouse over a dotted box for more information.

Now you try. Try fixing the y= statement to be the function you wish to plot. Also, try testing the ideas of shrinking, expanding, and translating functions, as in $x^2$ to $2*(x-5)^2$.

Type your code here:


See your results here:

This code will not run. You have to fix the y= statement first to define your parabola (hint: try y=x^2). Next, you have to fix the pset statement to plot $x$ on the x-axis, and $y$ on the y-axis. Can you do it? Dismiss.
Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.