## What is a bar chart?

A wide application of bar charts from newspapers to books made them an easily understood tool for representing various information.

**Bar chart** (or **bar graph**, **bar diagram**) is a graphical representation of data which uses vertical or horizontal bar of different heights. It is a great tool for comparison of data among categories.

Every bar chart has two axes; *x* – axis (the horizontal axis) and *y* – axis (vertical axis). **Data categories** are shown on the horizontal axis, while the vertical axis represents the **scale**. The **rectangular bars** are the data series.

Bar charts can be **vertical**, **horizontal** or **double**.

## When to use it

Bar charts are used for **plotting discrete data**; precisely, data which is not continuous and has discrete values. They are an excellent way of comparing items between different groups. The main goal is to represent the relation between the *x* – axis and *y* – axis.

There are many advantages of using bar charts, and one of them is surely possibility of representing data that shows** changes over time**. For example, a person might ask some group of people what is their favorite BMW car and then draw a pie chart which represents the percentages of people who prefer a certain type of car.

But, if we want to see how BMW’s preferences changed over time, we will use a bar chart. In other words, by looking at a bar chart, we could see which type of car customers prefer now and which they preferred ten years ago.

The **vertical bar chart** is the most common type of bar chart. We use them in situations when we want to display **ordinal variables**; for example, salary ranges.

We use **horizontal bar charts** when we want to display **nominal variables**; for example, favorite type of chocolate.

**Double bar charts** (or **double bar graphs, multiple bar graphs**) are used to compare more than one group. They also have two axes and we simply put the bars side by side.

## Examples

* Example 1: *A survey which included $150$ students asked them: ”What is your favorite sport?”. The results are:

Construct a vertical and horizontal bar chart for the given table. Which sport is the most popular?

**Solution:**

Sports represent data categories while number of students represents a scale.

Therefore, a vertical bar chart is:

A horizontal bar chart is:

Obviously, the most popular sport is football.

For easier reading, we can put numbers at the end of the bars:

** Example 2: ** The following table shows student marks in two tests.

Construct a double bar chart for the given table.

*Solution:*

*Test $1$ *represents first group that we observe, while *Test $2$ *represents the second group.

A double bar chart is:

By observing this bar chart, we can conclude that most of the students did better in test $2$ than in test $1$. Moreover, it is easier to conclude that by observing a double bar chart than the given table.