Graphing an XY scatter
plot of Data in an Excel Spreadsheet
Problem:
One of the powerful attributes of
a spreadsheet is the ability to predict from a dataset. Using the trendline
feature of Microsoft Excel allows for a forecast to be created easily.
Directions:
-
In cell A1, name the column referring
to the values of the x axis.
-
Move to the right 2 columns and name the column
referring to the y axis.
-
Below the title of the x values, insert each
x value (one number per cell).
-
Below the title of the y values, insert each
y value.
-
To graph these numbers select the top left hand
corner, hold down the (Windows:right mouse button; Macintosh: mouse button),
and move the mouse to highlight both columns of x and y values. Do not
select cells in Row 1.
-
Go to the top menu to select Insert,
then Chart. Another window will appear.
-
Select XY scatter for chart type. Press
Next.
Press Next again.
-
Type in the chart title. Type in the label of
the x axis and the label to the y axis.
-
From the top menu of the window, select Gridlines.
Select all major and minor gridlines. (All checks should be present.)
-
From the top menu, select Legend. Select
show legend. (No check appears.)
-
Select Next at the bottom and then Finish.
-
Move the graph (if necessary) by selecting the
graph with the mouse. Handles will appear on the edges of the graph. Use
the mouse to move the graph to the desired location.
-
Values can then be erased and new values can
be entered. The chart format will remain the same, but the x and y axis
range of numbers will automatically change to fit the data.
-
To change the title of the graph, the x axis,
or y axis, simply select the title and enter a new one.
-
To add a regression line or “line of best fit”
select the data points on the graph and click the (Windows: right mouse
button. When a pop-up menu appears, select add Trendline; Macintosh: click
on data points, go to Chart menubar and add trendline.) Choose the type
of line needed for the data.
-
To display the equation for the regression line,
click on the trendline, (Windows: go to Options and select Display
equation; Macintosh: go to Format, select Selected Trendline,
Options, Display Equation on Chart.)
Example:
Back