• Home
  • /
  • Blog
  • /
  • How to Draw a Line Graph? (Definition, Plotting & Examples)

How to Draw a Line Graph? (Definition, Plotting & Examples)

how to draw a line graph

This post is also available in: हिन्दी (Hindi)

A graphical representation of data and information offers a quick and simple way to understand the features. It is more effective than presenting the data in the form of tables. A graphic representation of data in the form of a straight line is called a line graph.
Let’s understand what is a line graph and how to draw a line graph and read it using examples.

What is a Line Graph?

A line graph is a type of chart or graph that is used to show information that changes over time. A line graph is plotted over a Cartesian system with a horizontal axis as $x$-axis and a vertical axis as $y$-axis using several points connected by straight lines. The x-axis usually has a time period over which we would like to measure the quantity of a specific thing or an item in the y-axis. 

A line graph helps to analyze the trend of whether the quantity in the y-axis is increasing or decreasing over a period of time. With the help of a line graph, you get a clear picture of an increasing or a decreasing trend.

CodingHero - How to Draw a Line Graph? (Definition, Plotting & Examples) Line Graph 01

Line Graph Examples

Let’s consider a few examples to understand what is a line graph.

Ex 1: A graph showing temperatures of a day. 

Note down the temperature at fixed intervals during the day. The following table shows temperatures during a particular day in a city.

how to draw a line graph

The figure below shows a line graph of the given data.

how to draw a line graph

Before moving on to how to draw a line graph, let’s understand the various parts of a line graph.

Parts of a Line Graph

Line graphs are drawn in an $x-y$ plane, where $x$ is the horizontal axis and $y$ is the vertical axis. A line graph consists of the following parts:

  • Title: It tells us about the data for which the graph is drawn and is written at the top of the graph.
  • Labels: There are two types of labels in a line graph:
    • Horizontal Axis (X-axis): It tells us about the label on the $x$-axis.
    • Vertical Axis (Y-axis): It tells us about the label on the $y$-axis.
  • Scales: There are two scales that tell us the quantitative value of “how much” or “how many”.
    • Horizontal Labels (Labels on X-axis): It tells us about the label on the $x$-axis.
    • Vertical Labels (Labels on Y-axis): It tells us about the label on the $y$-axis.
  • Points: The points or dots on the graph represent the $\left(x, y \right)$ coordinates. Such pairs of numbers are called ordered pairs. The data represented by $x$ is the independent variable, and the data represented by $y$ is the dependent variable.
  • Trend: The consecutive points are joined together to draw a line. The gradient or movement of a line is called the trend. The trend tells whether currently there is an increase or decrease and how fast that increase or decrease is.
  • Lines: Straight lines connecting the points give estimated values between the points.
how to draw a line graph

Properties of a Line Graph

A line graph has the following properties.

  • A line graph is drawn using straight line segments between points. By joining all points, we get a resulting line that may be a straight line or a curve.
  • It has two variables. One is called the independent variable while the other is called the dependent variable. The value of the dependent variable depends on the independent variable.
  • Ideally, the independent variable is exhibited on the horizontal axis, and the dependent variable is shown on the vertical axis.
  • A line graph can show the variation of one quantity with another, also known as a variable.

Types of Line Graphs

There are two main types of line graphs in statistics namely, a simple line graph, and a multiple line graph. Each of these graph types has different uses depending on the kind of data that is being evaluated.

Simple Line Graph

A simple line graph is a kind of graph that is plotted with only a single line. Like in the diagram above, shows the relationship between two variables.

In most cases, one of these variables is independent, while the other is a dependent variable. The independent variable is usually time, but it can also be any other factor.

how to draw a line graph

In the example above Earnings is the dependent variable while the Year is the independent variable.

Multiple Line Graph

A multiple-line graph is a line graph that is plotted with two or more lines. It is used to depict two or more variables that change over the same period of time. 

The independent variable is usually on the horizontal axis, while the 2 or more dependent variables are on the vertical axis. For example, if you want to compare the number of boys and girls students in a school over a couple of years, you need to visualize it using a multiple-line graph.

how to draw a line graph

Reading a Line Graph

The different steps to read and interpret a line graph are given below:

Step 1: Observe the title. It tells about the information presented by the line graph.

Step 2: Observe the labels on the two axes. These figures give information about the data used to draw a line graph.

Step 3: Check out the emerging patterns to understand the trend. A trend can be increasing (line moving upwards when you move from left to right along the $x$-axis) or it can be decreasing (line moving downwards when you move from left to right along the $x$-axis).

Step 4: Observe the data values to get exact figures.

Examples

Ex 1: The following line graph shows the yearly sales figures for a manufacturing company.

  • What were the sales in (a) 2002 (b) 2006?
  • Compute the difference between sales in 2002 and 2006.
  • In which year was there the greatest difference between the sales as compared to the previous year?
how to draw a line graph

The vertical (y-coordinate) of a point corresponding to the year 2002 is 4. Therefore, sales in 2002 is ₹4,00,00,000.

The vertical (y-coordinate) of a point corresponding to the year 2006 is 8. Therefore, sales in 2006 is ₹8,00,00,000.

Difference between sales in 2002 and 2006 is 8,00,00,000 – 4,00,00,000 = ₹4,00,00,000.

Since the line is steepest between the years 2004 and 2005(the slope of the line is greatest), therefore, in 2005 there is the greatest difference between the sales as compared to the previous year.

How to Draw a Line Graph?

The different steps to plot the points and draw a line graph are given below:

Step 1: Set Up a Table: Draw the $x$ (horizontal axis) and $y$ (vertical axis) on a page. On the top of the page, write a title that briefly describes the purpose of the chart.

Step 2: Label Each Axis: If one of the elements is time, it goes on the $x$ or the horizontal axis. The other element goes on the $y$ or the vertical axis, the y-axis. Divide and mark the axes as per their individual characteristics.

Step 3: Plot Data: Using the given data, indicate the values on the graph. Join the points. Once you’ve added your data, your line graph will automatically reflect its values.

Step 4: Create a Key: If you are comparing multiple items, you’ll want to create a key that identifies what each line is by its colour.

Pros and Cons of a Line Graph

Pros
  • It helps to show small shifts that may be getting hard to spot in other graphs
  • It helps show trends for different periods
  • They are easy to understand
  • To compare data, more than one line can be plotted on the same axis
Cons
  • If we plot too many lines on the same graph, it can become cluttered and hard to read
  • Application is limited to data sets that have numerical and whole values
  • When data sets have fractional or decimal values, it becomes difficult to plot them

Key Takeaways

Following are some of the important points about a line graph.

  • A line graph is a graph that is used to display change over time as a series of data points connected by straight-line segments on two axes.
  • Line graphs are used to demonstrate information on factors and patterns. 
  • A line graph is used to determine the relationship between two sets of values, with one data set always being dependent on the other data set. Usually, $x$-points are called independent and $y$-points are called dependent points.
  • One important term related to line graphs is the slope. The slope represents how steep a line is. It helps in comparing the magnitude of change between any two consecutive points on the graph.

Practice Problems

The number of days a hillside city received snow in different years.

how to draw a line graph

Draw a line graph of the above data.

Population (in thousands) of men and women in a village in different years.

how to draw a line graph

Draw a line graph of the above data.

Draw the graph for the following table of values, with suitable scales on the axes.

how to draw a line graph
  • Does the graph pass through the origin?
  • Use the graph to find the interest on ₹2500 for a year.
  • To get an interest of ₹280 per year, how much money should be deposited?

FAQs

What is a line graph used for?

Line graphs are used to track changes over short and long periods of time. When smaller changes exist, line graphs are better to use than bar graphs. Line graphs can also be used to compare changes over the same period of time for more than one group.

What are the different parts of a line graph?

A line graph has six parts. These are 
1. Title: It tells us about the data for which the graph is drawn and is written at the top of the graph.
2. Labels: There are two types of labels in a line graph:
2a. Horizontal Axis (X-axis): It tells us about the label on the $x$-axis.
2b. Vertical Axis (Y-axis): It tells us about the label on the $y$-axis.
3. Scales: There are two scales that tell us the quantitative value of “how much” or “how many”.
3a. Horizontal Labels (Labels on X-axis): It tells us about the label on the $x$-axis.
3b. Vertical Labels (Labels on Y-axis): It tells us about the label on the $y$-axis.
4. Points: The points or dots on the graph represent the $\left(x, y \right)$ coordinates. Such pairs of numbers are called ordered pairs. The data represented by $x$ is the independent variable, and the data represented by $y$ is the dependent variable.
5. Trend: The consecutive points are joined together to draw a line. The gradient or movement of a line is called the trend. The trend tells whether currently there is an increase or decrease and how fast that increase or decrease.
6. Lines: Straight lines connecting the points give estimated values between the points.

Why is it called a line graph?

A line graph is a graph that is used to display change over time as a series of data points connected by straight-line segments on two axes. A line graph is also called a line chart. It helps to determine the relationship between two sets of values, with one data set always being dependent on the other data set.

How do you analyze a line graph?

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.

Conclusion

A line graph is a type of chart or graph that is used to show information that changes over time. Line graphs can also be used to compare changes over the same period of time for more than one group. Knowing how to draw a line graph helps to determine the relationship between two sets of values, with one data set always being dependent on the other data set.

Recommended Reading

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>