Use line charts to display a series of data points that are connected by lines. Analysts use line charts to emphasize changes in a metric on the vertical Y-axis by another variable on the horizontal X-axis. Often, the X-axis reflects time, but not always. Line charts are also known as line plots.

Line charts are similar to scatterplots except that they connect the data points with lines. Choose a line chart when ordering and joining the data points by their X-axis values highlights meaningful changes in the vertical Y-axis variable.

Analysts use these charts in many settings to display different types of information. Consequently, these charts can track many types of measurements by time, values of another variable, and categories.

Use a line plot to do the following:

- Graphically assess how a metric changes as the X-value increases.
- Emphasize trends and patterns.
- Display main and interaction effects.

Line charts typically require a continuous variable for the Y-axis and a continuous, time, or categorical variable for the X-axis. To learn about other graphs, read my Guide to Data Types and How to Graph Them.

## Example Line Chart

A school tracks its enrollment over time and uses a line chart to display the long-term trends.

Line plots typically contain the following elements:

- Y-axis representing a metric that is often an observed value or a summary statistic such as the average or total.
- X-axis representing values of another variable.
- Lines connecting data points based on a sequential increase in their X-values.
- Optionally, line charts can track multiple metrics over the same X-values, allowing you to compare the trends and patterns between the metrics.

The line chart for the school’s enrollment shows a period of growth in the beginning, a plateau in the middle, and a decline at the end. At a glance, you can understand 30 years of enrollment history.

## Interpreting Line Charts

The changing slope of the line segments emphasizes changes, trends, and patterns. For a single series of data, assess the changes in the line to identify trends and patterns.

When you have multiple metrics, compare their lines to determine whether they have the same trend and patterns. Comparing the metrics in this manner helps you understand their differences and similarities.

Line charts frequently track changes over time. A time series plot is simply a line chart where observations occur at regular time points. However, observations for line charts do not need to happen at consistent intervals.

**Related post**: Time Series Introduction

Main effects plots and interaction plots are specialized line plots that display these types of effects for independent variables in regression and ANOVA models.

Click these links to see examples of main effect plots and interaction plots in action!

Ju says

How do you read a value that is between two data points? I’m trying to hover over an imaginary data point to see what the value would be(in case of a linear line). Is that possible?

P.C. Srivastava says

Dear Dr. Jim,

I would be grateful if you kindly tell us about three dimension plotting both line diagram and surface.

With kind regards,

Prakash

Jim Frost says

Hi Prakash,

I write about contour plots, which are 2D representations of three variables. You might check that out. I’ll add surface plots down the road for sure!

Thanks for writing!