I. PLOTTING A LINE GRAPH In science, a line graph is used to show the relationship between two quantities, one of which depends on the other. For instance, in Table 1, the data shows that pressure depends on (i.e., is a function of) altitude above sea level. This relationship can be better illustrated if the data is plotted in a line graph. Each point along the line is related to one pressure reading and one altitude measurement.
TABLE 1 VARIATIONS OF PRESSURE WITH ALTITUDE
Altitude (km above sea level) | Pressure (torr)
0 (sea level) | 760
1 | 673
2 | 594
3 | 525
4 | 471
5 | 404
6 | 354
7 | 308
8 | 268
9 | 231
10 | 198
Steps in Plotting
1. Prepare a data table as in Table 1 on a separate sheet of writing paper.
2. Using graph paper provided, draw a line several cm from the left edge of the paper for a vertical axis, and another line several cm from the bottom edge for a horizontal axis.
3. Select each axis. In this case, the pressure is plotted as a function of altitude, so the altitudes (independent variable) will be plotted on the horizontal (X axis), and the pressures (dependent variable) will be plotted on the Y axis.
4. Determine the range of values for each axis by subtracting the smallest value from the large at one. The altitude varies from 0 to 10 km, a range of 10 km. The pressure varies from 198 torr to 760 torr, a range of 502 torr. This is an inconvenient number to work with and should be “rounded off” to the next convenient larger number, for example, 600 torr. You may want to start the graph below 198 (either 100 torr or 0 torr) and end it at a maximum of 800 torr.
5. Select a convenient scale of units for each axis.
A. Count the number of lines, or divisions, on an axis available on your graph paper.
B. Divide the range by the number of divisions, e.g.: Horizontal axis: (or 1 km for every 2 divisions) Vertical axis: (or 100 torr for every 2 divisions)
C. If the result per division is not a convenient number (i.e., one which is easy to plot and read), round it off to a larger more convenient value, e.g.: Raise 0.33 0.50; 1.7 2; 3 5; 9.5 10; 13 20 and 26.7 torr becomes 50.0 torr 1 division 1 division
D. Time is well spent selecting an appropriate scale, as your graph should be large enough for you to plot the data with reasonable accuracy and able to be read easily by others.
6. Assign values to the scale divisions:
A. Begin with 0 or a number smaller than the lowest number to be plotted.
B. Label each major scale division with a number that adds to the previous one by an equal amount, e.g. the horizontal (X axis) is labeled in units of 1 km for every 2 divisions (0, 1, 2, 3 etc), the vertical (Y axis) is labeled in units of 100 torr for every 2 divisions (0,100, 200, 300, etc.)
7. After both axes are labeled numerically, they are then labeled with the names of the plotted variables. Here the Y axis is labeled “Pressure” and the units of pressure (torr) are given in parenthesis after the name of the variable. The X axis is labeled "Altitude" and units (km) are placed in parenthesis after the name of the variable.
8. A point for each set of values is plotted.
A. Locate one value, altitude, on the X axis and follow an imaginary line upward (use a ruler if necessary).
B. Locate the corresponding value on the Y axis and follow an imaginary line horizontally to the right.
C. At the intersection of the two imaginary lines place a dot with a sharp pencil point. Circle the dot so that it can be easily located.
9. Repeat this procedure for each set of values.
10. After there is a dot for each set of data examine the outline of the plotted points.
A. Are the points arranged approximately in a straight line? Then lay a ruler in such a position as to include all the points, or, if not exactly a straight line, set the ruler so that an equal number of points occur on each side of the line, and, equally as far away from it as possible. Draw the line with a pencil.
B. Are the points arranged in a curve? Sketch the curve so as to include the points as a smooth shape with as many points on one side as on the other. Erase the trial lines and draw a single smooth curve.
11. Entitle the graph at the top of the paper, "Variation of Pressure and Altitude".
II INTERPOLATION
The graph can now be used to determine altitude-pressure relationships that are not given in the data. For example, the average atmospheric pressure at an altitude of 1.5 km can be determined using the graph. First, the point that represents 1.5 km is found on the x-axis and an imaginary line is followed vertically upward unit it intersects the curve. From this point, an imaginary line is followed horizontally to the left until it intersects the y-axis. The pressure represented by the point of intersection of the second imaginary line and the y-axis is about 630 torr. Therefore, the average atmospheric pressure at an altitude of 1.5 km is 630 torr. The process of determining an unknown value that falls between known values on a graph is called interpolation. Use your graph to determine at what altitude the pressure is 425 torr.
III. EXTRAPOLATION
Often a line graph may be extended beyond the known values to determine results outside the experimental data. This is called extrapolating the graph. When extending the graph, continue straight lines at the same angle and direction. Curved lines are extended along the same curve. Care must be used with extrapolation, because sometimes other factors may cause a change in shape of the graph line, as conditions may vary beyond one's experimental values.
IV. GRAPHING WITH MICROSOFT EXCEL WORKSHEETS
Excel is a powerful computer program that will help you to create charts and graphs, do statistical analysis and automate simple calculations for this and future science courses. Suppose you have a 10-gram ice cube, and you want to know the mass of the ice as it melts over a period. As the ice melts and the water drains away, the mass of the ice will decrease with time. You measure the mass of the ice cube every 2 minutes for 30 minutes and get data as listed in the table below.
Time (minutes) | Mass (grams)
0 | 10
2 | 9.3
4 | 8.5
6 | 8.1
8 | 7.2
10 | 6.4
12 | 5.6
14 | 5.1
16 | 4.6
18 | 4.0
20 | 3.1
22 | 2.5
24 | 1.8
26 | 1.1
28 | 0.7
30 | 0.0
Input these numbers into your Excel spreadsheet.
1) Highlight the data in the two columns you just created. Include text only … DO NOT include the column headings. Click on the “Insert” tab on the toolbar at the top of the page, and icons will appear that represent several options for the types of charts.
2) Click on “XY (Scatter)” from the several types of graphs. Then select one of the 5 options for the appearance of the graph (try the one with data points and curvy lines).
3) You should now see the graph you selected appear on the spreadsheet. The graph will need to be dressed up by adding a heading and axis labels.
4) First you need to get rid of useless and often annoying parts of the graph. You will see a legend labeled “Series 1”. If more than one set of y values were entered, the graph would have more than one line, and legend labels would appear as “Series 2”, “Series 3”, etc. Since there is only one data set in this exercise, click on the “Series 1” legend. A frame will appear around the legend. Press the “Delete” key to remove the legend from the graph.
5) The graph needs a heading and axes labels. Click on the graph. A frame will appear around the graph and a new set of tabs will appear in the menu. Click on the “Layout” tab of “Chart Tools”. This takes you to a set of icons that will allow you to create a heading and labels for the axes.
6) Click on the “Chart Title” icon and a pop-up window will open that allows you to locate your title on the chart. Click on “Above Chart” and a frame will appear on the chart. Give your chart a title by typing “Mass of Melting Ice Cube” in the frame.
7) To insert labels, click on the “Axis Title” icon, then select the “Primary Horizontal Axis Title” (that is the “x” axis) and then select “Title Below Axis”. A box will appear under the “x” axis. Click on the box and type “Time (minutes)” in the box. Repeat the process to create a title for the “Primary Vertical Axis Title” (that is the “y” axis) and select “Rotated Title”. Type “Mass (grams)” in the box that appears to the left of the “y” axis. Make sure to include the units in your labels.
8) Click on the blank space in your new chart. A frame will appear around the graph and a new toolbar will appear at the top of the page. Click on the “Add Trendline” icon and then on “More Trendline Options …”. A new window will appear with lots of options. Select “Linear” and then check two boxes at the bottom of the window: “Display Equation on chart” and Display R-squared value on chart”.
9) Close the window and a line will appear through the data points in your graph. Also, an equation and an R2 value will appear. Click on the equation and then drag it to an open area in the chart. This best fit line also describes a mathematical equation of the form y = mx + b, where x and y are your axes, m is the slope of the line, and b is the y intercept. You should have gotten the equation y = -0.3343x + 9.889. The slope of the line, m, is –0.3343, where m is equal to the change in y value divided by change in x value (∆y ÷ ∆x). What this means is that the mass of the ice block changes by –0.3343 gram (the mass decreases) per each minute. The y intercept is 9.889. This is the point where your line crosses the y axis at time zero. The R2 value gives you an idea of how close your points are to the best fit line. A value of 1.00 means that ALL points are EXACTLY on the line. A number close to 1.00 (e.g., from 0.95 to 0.99) means that there is an excellent correlation between the data itself and the line describing the data.