How to make a line graph using Excel 2007

Transcription

How to make a line graph using Excel 2007
How to make a line graph using Excel 2007
Format your data sheet

Make sure you have a title and each column of data has a title.

If you are entering data by hand, use time or the independent variable in the first column and
your observations or measurements in the next column. Be sure to include a label in the top cell
of each column.

For Hobo datalogger data, you only need three columns: “Date/Time” “Temperature (*C)” and
"Intensity". This example uses just the Date/time for the X axis (independent variable) and
temperature for the Y axis (dependent variable).

You may wish to use the use the "Temp data for graphing exercise" Excel file included with
these instructions. If you wish to use your own data, just set up your spreadsheet with the
appropriate columns and you can follow the steps below.
Highlight data to be graphed.

Click on the "air temperature" label at the top of the data column.
Hold down ctrl + shift and press the down arrow key on the
keyboard. The column of data will be selected.

You can also select the data by clicking on the top cell of the
column and holding down the left mouse button while scrolling
down to the end of the column.

In the future, if you need to select data from columns that are not
next to each other, highlight the first column, then hold down the
Ctrl key and highlight the other column you need.
Select the "insert" tab. This brings up many choices of graph
types. Choose a line graph with markers.
Excel automatically makes a graph, but we have to move it and adjust it to our needs
Move the graph
 Right click in the large white area of the graph and select "move chart" on the pop-up menu.
 Click on "New sheet" in the dialogue box and enter a name for the new chart in the space.
Adjust the graph.
 Click the corner of the graph area and
stretch it out horizontally to fill the
space. This will partially obscure the
legend.
 Right click on the legend and when the
cursor looks like a plus sign, you can
drag it to a new location. Place the legend
in the graph space near the top right (or
wherever you wish).
 You can also delete the legend if you
wish - we don't really need it for this
graph.
 To define the X axis labels, right-click in the chart area and choose "select data." The dialogue
box will appear.
 Click on the "edit" button for the horizontal Axis labels.
 Click on the small square chart icon to the right of the space to choose the axis labels
 To select the X axis labels, go back to the page
with the data values ("data" tab at the bottom
of the workbook) and highlight the first cell
with a value in the date and time column.
 Hold down the ctrl + shift key and press the
down arrow to select the column of X axis
values
 Click the small square icon in the dialogue
box (same as above) and then click OK. The
chart will display the date and time for each
temp data point.
 If the X axis values are obscured at the bottom
of the chart page, click on a bottom corner of
the graph to make the chart area smaller and
reveal the X axis labels.
 Now we have X axis labels, but
there are too many of them, so
that they are hard to read. Let's
fix the labels to spread them out.
 Right click on the X axis labels and choose "format
axis" from the drop-down menu.
 In the Axis options menu, set the intervals
for tick marks to 12, then click "specify
interval unit" and specify 12 for the interval
between labels.
 You may want to set the text at an angle; to do
this click on the Alignment option in the left
hand column and set the custom angle to - 30 .
Now let's fix the Y axis scale and the title. The Y axis shows too much blank space at the bottom of
the scale.
 Right click on the Y axis to get to the list that
includes "format axis" and click on it. In the "Axis
options" dialogue box, choose the "fixed" option for
minimum and maximum. Choose a minimum value
of 15 and a maximum value of 29.
 Click on the title and enter text to clarify what the graph is showing.
To add a label to the Y axis, click in the chart
area to call up the Chart tools menu tab at the top of
the page. Click on the "axis titles" icon and select
"primary vertical axis title" and "rotated title"
You can click on the text in the box to enter a label, and
drag the box to the location you choose.
Try out some of the other options in the menu bars. You can change the labels, color and style
of the line, and add gridlines. Try adding the water temperature data from
the
spreadsheet by right clicking in the chart area and using the dialogue box.
You can always click on the question mark in the upper right and type a question or topic
in the “help” box.
Please contact Pat Harcourt if you have questions, corrections, or suggestions for this exercise.
[email protected] 213 740-4693 or 508 215-9641.