# Lesson goal: Plot an array of data

Previous: Make a Chart | Home | Next: Make a 3D-printable XY-graph

In this lesson, you can interface to Google Charts to create a nice looking plot of a mathematical function. In order to do this, you have to fill two arrays with the $(x,y)$ pairs that you want to plot. Once done, pass these two arrays to the plot function described here, and you'll see a professional-looking plot of your arrays.
plot(x,y)

Remember, the plot will appear at the bottom of the browser window. You might have to scroll down to see it.

# Now you try. Finish the x[i]= and y[i]= lines with the x and y points that you wish to plot.

This code will not run! You have to finish the x[i]= line with the point-by-point x-coordinates you wish to plot. Next, you have to finish the y[i]= line with the point-by-point y-coordinates you wish to plot. Dismiss.
Show a friend, family member, or teacher what you've done!

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.