by Svetlana Cheusheva, updated on
The tutorial explains the process of making a line graph in Excel step-by-step and shows how to customize and improve it.
The line graph is one of the simplest and easiest-to-make charts in Excel. However, being simple does not mean being worthless. As the great artist Leonardo da Vinci said, "Simplicity is the greatest form of sophistication." Line graphs are very popular in statistics and science because they show trends clearly and are easy to plot.
So, let's take a look at how to make a line chart in Excel, when it is especially effective, and how it can help you in understanding complex data sets.
A line graph (aka line chart) is a visual that displays a series of data points connected by a straight line. It is commonly used to visually represent quantitative data over a certain time period.
Typically, independent values such as time intervals are plotted on the horizontal x-axis while dependent values such as prices, sales and the like go to the vertical y-axis. Negative values, if any, are plotted below the x-axis.
The line's falls and rises across the graph reveal trends in your dataset: an upward slope shows an increase in values and a downward slope indicates a decrease.
Line charts work well in the following situations:
There are a few cases in which a line graph is not suitable:
To create a line graph in Excel 2016, 2013, 2010 and earlier versions, please follow these steps:
A line graph requires two axes, so your table should contain at least two columns: the time intervals in the leftmost column and the dependent values in the right column(s).
In this example, we are going to do a single line graph, so our sample data set has the following two columns:
In most situations, it is sufficient to select just one cell for Excel to pick the whole table automatically. If you'd like to plot only part of your data, select that part and be sure to include the column headers in the selection.
With the source data selected, go to the Insert tab > Charts group, click the Insert Line or Area Chart icon and choose one of the available graph types.
As you hover the mouse pointer over a chart template, Excel will show you a description of that chart as well as its preview. To inset the chosen chart type in your worksheet, simply click its template.
In the screenshot below, we are inserting the 2-D Line graph:
Basically, your Excel line graph is ready, and you can stop at this point… unless you want to do some customizations to make it look more stylish and attractive.
To draw a multiple line graph, perform the same steps as for creating a single line graph. However, your table must contain at least 3 columns of data: time intervals in the left column and observations (numeric values) in the right columns. Each data series will be plotted individually.
With the source data highlighted, go to the Insert tab, click the Insert Line or Area Chart icon, and then click 2-D Line or another graph type of your choosing:
A multiple line graph is immediately inserted in your worksheet, and you can now compare the sales trends for different years to one another.
When creating a multiple line chart, try to limit the number of lines to 3-4 because more lines would make your graph look cluttered and hard to read.
In Microsoft Excel, the following types of the line graph are available:
Line. The classic 2-D line chart demonstrated above. Depending on the number of columns in your data set, Excel draws a single line chart or multiple line chart.
Stacked Line. It is designed to show how parts of a whole change over time. The lines in this graph are cumulative, meaning that each additional data series is added to the first, so the top line is the total of all the lines below it. Therefore, the lines never cross.
100% Stacked Line. It is similar to a stacked line chart, with the difference that the y-axis shows percentages rather than absolute values. The top line always represents a total of 100% and runs straight across the top of the chart. This type is typically used to visualize a part-to-whole contribution over time.
Line with Markers. The marked version of the line graph with indicators at each data point. The marked versions of Stacked Line and 100% Stacked Line graphs are also available.
3-D Line. A three-dimensional variation of the basic line graph.
The default line chart created by Excel already looks nice, but there is always room for improvement. To give your graph a unique and professional look, it makes sense to begin with the common customizations such as:
In general, you can adjust any element of your graph as explained in How to customize a chart in Excel.
Additionally, you can do a few customizations specific to a line graph as explained below.
While making a graph with multiple lines, you may not want to display all the lines at a time. So, you can use one of the following methods to hide or remove the irrelevant lines:
When creating a line chart with markers, Excel uses the default Circle marker type, which in my humble opinion is the best choice. If this marker option does not fit well with the design of your graph, you are free to choose another one:
If the default line colors do not look quite attractive to you, here's how you can change them:
If the standard color palette is not sufficient for your needs, click More Colors… and then pick any RGB color you want.
On this pane, you can also change the line type, transparency, dash type, arrow type, and more. For example, to use a dashed line in your graph, click the Dash type drop-down box and choose the pattern you want:
Tip. Even more formatting options are available on the Chart Tools tabs (Design and Format) that activate when you select the chart or its element.
By default, the line graph in Excel is drawn with angles, which works fine most of the time. However, if the standard line chart is not beautiful enough for your presentation or printed materials, there is an easy way to smooth the angles of the line. Here's what you do:
In case of a multiple line chart, perform the above steps for each line individually.
The standard Excel line graph includes the horizontal gridlines that make it easier to read the values for data points. However, they do not necessarily need to be so prominently displayed. To make the gridlines less obtrusive, all you have to do is change their transparency. Here's how:
That's it! The gridlines are faded into the background of the chart where they belong:
To visualize trends in a series of data located in rows, you can create a number of very small line charts that reside inside a single cell. This can be done by using the Excel Sparkline feature (please follow the above link for the detailed instructions).
The result will look something similar to this:
That's how you plot a line graph in Excel. I thank you for reading and hope to see you on our blog next week!
Table of contents