Make a Line Graph in Microsoft Excel
Line graphs are most useful when tracking data over a period of time. The X-axis represents the passage of time, and the Y-axis tracks the datapoints. Some examples for uses of line graphs include: tracking sales for the year, seeing how students’ test scores change over time, displaying the number of traffic accidents over the years; basically anything that can be expressed as a function of time. This guide will get you up and running with a basic line graph before you know it.
Contents
Steps
Making a Basic Line Chart
- Enter your data. A line graph requires two axes in order to function. Enter your data into two columns. For ease of use, set your X-axis data (time) in the left column and your recorded observations in the right column. For example, tracking a sports team’s wins would see the year in the left column, and the corresponding number of wins in the right.
- Click Insert. From the tabs on the top of the Excel window, select Insert to see everything that you can insert into an Excel worksheet.
- Click Line Graph In the Charts group there will be an option for Line Graphs. Select it. A blank graph field will appear in your spreadsheet.
- Depending on your version of Excel, there will be no option that actually says, Line Graphs. Find the icon that looks like a line graph, and hover over it to confirm that it is the Line Chart option. When you hover over it, it will say, Insert Line Chart.
- There will be several options for line graphs. If you have a lot of datapoints, choose a standard line graph. If you only have a small number of datapoints, choose the Line with Markers graph, as it will highlight each piece of data on the line. Again, hover over each icon with your cursor to see a more detailed explanation of what the icon represents.
- Select your data. When you click on the chart, the Chart Design menu will open. In the Data group, click on Select Data. The Select Data Source window will open up.
- Select the Chart Data Range field. With the Select Data Source window open, highlight all the cells that contain the data you want to turn in to a line graph -- including the column names.
- Format your data. In the Under Select Data Source window and under the Horizontal (Category) Axis Labels, click the Edit button. Select the column that contains the data you want to be on the X-axis, which is usually time. Select the entire column by clicking on the letter above that column. Then, click OK from the Axis Labels window. This will now label the X-axis with whatever you entered in to the column header.
- After you have added the X-axis column to Horizontal (Category) Axis Labels, remove that column from the Legend Entries (Series). Select it, then click the Remove button.
- Your basic line chart is now complete. You can edit the visual appearance of the chart by right-clicking on the chart and selecting Format Chart Area… This will give you options on line sizes and colors. You can do the same with each individual element of the chart by right-clicking and selecting the Format option.
- You can change your chart title by clicking on the title once to select it, and then again to activate the text cursor. By default, the title is the same as the label for your data.
- You can resize your chart by clicking and holding a corner with your mouse. Drag the mouse to resize the chart.
- Use the Layout menu to adjust your chart’s visual elements. You can change many different aspects of your chart through the Layout menu.
- You can insert an explanatory text box, or place pictures on the chart to highlight the datapoints.
- You can use the Layout menu to adjust where the legend shows up, and how the axes are labeled.
- You can also choose from several preset layouts in the Design menu.
Adding Another Set of Data
- Enter your data. To create a second series, enter the data into your spreadsheet as you did in the first section. The data should line up with the same time values as the first set. After you finish you should have three columns of the same length.
Easiest Method
- Copy the data. Select the cells you wish to include in the chart, including the header of the column. Then, press Ctrl+C to copy it.
- Paste the data. Select the chart box, then press Ctrl+V to paste the data as a new line in your chart. If you do not see the new line appear, read on in this method.
- Be sure you are actually selecting the entire chart, rather than the X-axis, Y-axis, or Chart Title.
Advanced Method
- Click your chart. Then click Select Data under the Data heading. The Select Data Source window will open again.
- Under Legend Entries (Series), click the Add button.
- In the Series name field, select the cell with the heading name for your second set of data.
- In the Series values field, select the cells that contain your new data. This field needs to have an "=" sign in front of it or Excel will return an error.
- Press OK. You will be taken back to the Select Data Source window. Your new line will appear on the chart.
- Highlight your second entry in the Legend Entries (Series) frame. Then, in the Horizontal (Category) Axis Labels frame, click the Edit button. Select the time column again. This will prevent conflicting X-axis labels from messing up the graph.
- Your second line has been added and properly labeled. Format it using the steps above to match the aesthetic of your spreadsheet.
Related Articles
- Add a Graph to Microsoft Word
- Create a Usable Sourcesafe Files Report
- Truncate Text in Excel
- Unmerge Cells in Excel
- Edit Data in Microsoft Excel