01A Graphing 2007

CHM 152
Lab 1A: Plotting with Excel (2007 or later)
updated: May 2013
Introduction
In this course, several labs will require you to plot data, most of which will have a linear relationship (y =
mx + b). There are several advantages to using a spreadsheet program like Excel for graphing. For
starters, they usually look better than a hand-drawn plot (especially those drawn by students trying that are
either running late or trying to get out of lab as quickly as possible). With linear plots, Excel can
automatically add the best-fit line and generate the linear equation for you. While many students are nerds
already quite proficient at doing this, there still just as many that have rarely or never used Excel at all. As
such, our first lab of the semester will be an introduction to preparing linear plots using Excel, and how
they should look when you include them in your report.
Linear plots you prepare in this and future labs should be formatted as follows:
It should take up an entire page.
It should be formatted so the data uses as much of the page as possible.
It should include a title and both axes should be properly labeled (value measured and units).
If you’re only plotting one set of data, remove the legend to give your plot more space.
Linear plots should include the equation (y = mx + b) as well as the R 2 value. R2 is a
statistical value between 0-1 that measures how linear your data is. The closer it is to 1, the
more linear your data is. It’s a convenient way for you (and the instructor) to gauge the
accuracy of your data.
Graphing Linear Data with Excel
Example: The following data was collected, which measured the boiling point of an aqueous solution over
various concentrations.
Concentration (m) Boiling point ( C)
1.34
100.60
1.89
101.18
2.58
101.61
3.76
102.70
1. Open Excel and insert your data anywhere in the
spreadsheet. The first column should be the
independent variable (i.e., the property you’re
controlling), which we put on the x-axis, and the
second column should be the dependant variable
(i.e., what you’re measuring), which goes on the yaxis. Here, we’re measuring boiling point by
varying concentration, so boiling point is the
dependant variable and concentration the
independent variable.
2. Select all of your data, including the headers (in this case columns A and B, rows 2 through 5.
3. Go to the Insert area. In the Charts, section,
click on Scatter and select Scatter with only
Markers.
Your plot will appear in the spreadsheet.
4. At this point your chart looks like
the figure on the right.
5. Double-clicking anywhere in the
chart should bring up the Chart Tools
toolbar. In the Chart Layouts
section, select “Layout 9” and Excel
will automatically add axis labels,
best-fit line, linear equation, and R2
value.
(R2 is a measure of how linear your
data points are. The closer the number
is to one, closer your points are to
being linear).
6. At this point your chart looks like
the figure on the right.
Since there’s only one set of data, we
really don’t need the legend on the far
right. Right-click on it and select
Delete to widen your chart out a bit.
Sometimes the equation is placed too
close to the trendline. When that
happens, simply click on the equation
and move it where you like.
7. To rename an axis label, select it then double-click. Axis labels should include the property that was
measured, including its units. Rename the y-axis “Boiling Point (ºC)” and the x-axis “Concentration (m)”
If you’ve never had to type it before, the degree symbol for your temperature unit can be found in the
Symbol section, under the Insert tab (Subset “Latin-1 Supplement”). You can use a superscript, lowercase o.
8. For this course, plot titles should
include the lab number and what was
plotted. For this plot, select and
double-click the title and rename it
“Lab 1: Boiling Point vs.
Concentration.”
At this point your plot should look like
the figure on the right.
9. Finally, when applicable you should resize one or
both axes to get rid of empty space. Not only does
it zoom in on the important stuff, it just looks nicer
that way.
To do this, right-click on the axis your want to
reformat and select “Format Axis”.
For the x-axis, change the minimum from Auto to
Fixed, and make the new minimum “1” (see figure
on right).
For this plot, you can leave the y-axis where it is.
10. Your final plot should look something like this:
\
To print a full-page version of your plot, select the chart and hit the Print button (if you forget to select the
chart and simply hit Print, it may not print correctly).
Name: _____________________________
Section: ________
Questions
1. Prepare a plot of concentration vs. boiling point like the one shown in step 10 of this lab, using the same
data used in that example (see page 1). Print this plot as part of your assignment.
2. The volume of a gas was measured at various temperatures at a constant pressure, giving in the
following data.
Temperature ( C)
30.0
40.0
50.0
60.0
70.0
80.0
Volume, (L)
24.84
25.66
26.49
27.94
28.12
28.99
a) Plot the data, reformatting as needed, and note the linear equation and R 2 below. Print this plot as part of
your assignment.
y = _________________
R2 = _______________
b) In this course, there’s usually insufficient time to repeat a trial or measurement, so it’s usually acceptable
to omit one “bad” data point from your plot, so long as you have at least three others to work with.
From your data table, remove the entry at 60.0 C (simply highlight the two boxes and hit “Delete”). Excel
should automatically remove this point from the plot.
Write the new linear equation and R2 below. You don’t have to print a copy of this plot.
y = _________________
R2 = _______________
c) Using the linear equation from 2b, calculate the expected volume of this gas at -20.0 C?
d) Using the linear equation from 2b, calculate the temperature for a volume of zero.
e) The slope of 2b should look a little familiar, at least to the first few digits. Identify this number (hint: we
used this number a lot when we discussed gases in General I).