Charts and Graphs

Difficulty: Beginner Reading Time: 10 minutes

Why We Visualize Data

A table of 500 numbers is hard to make sense of. But turn those numbers into a chart, and patterns jump out immediately. You can spot trends, compare groups, and notice things that would be invisible in a spreadsheet. Choosing the right chart for your data is a skill that makes you a better communicator and a sharper thinker.

12 Mon 19 Tue 8 Wed 25 Thu 15 Fri

In this lesson, we will cover the five most common chart types, when to use each one, and what mistakes to avoid.

Bar Charts: Comparing Categories

A bar chart uses rectangular bars to compare values across different categories. Each bar represents a group, and the length or height of the bar shows its value.

Example

A survey asks 100 people their favorite fruit:

  Apples   |████████████████████  40
  Bananas  |██████████████  28
  Oranges  |████████  18
  Grapes   |███████  14
           +--------------------
            0   10   20   30   40
    

At a glance, you can see that apples are the clear favorite, and grapes are the least popular.

Use bar charts when: you want to compare amounts across distinct categories - sales by region, votes by candidate, number of students in each major, customer ratings for different products.

Avoid when: you have too many categories (more than 10-12 bars become hard to read) or when you want to show change over time (a line graph is usually better for that).

Horizontal vs. Vertical Bars

Vertical bars (columns) are the most common. Horizontal bars work better when your category labels are long - for example, comparing survey responses like "Strongly agree," "Somewhat agree," and so on.

Pie Charts: Showing Parts of a Whole

A pie chart is a circle divided into slices, where each slice represents a proportion of the total. The bigger the slice, the larger that category's share.

20 30 40 50 60 70 80
Example

How a household spends its monthly budget:

     Housing ........... 35%  ████████
     Food .............. 20%  █████
     Transportation .... 15%  ████
     Healthcare ........ 10%  ███
     Savings ........... 10%  ███
     Other ............. 10%  ███
                        ----
                        100%
    

You can quickly see that housing takes up more than a third of the budget.

Use pie charts when: you want to show how a total breaks down into parts, and you have a small number of categories (ideally 5-7). Budget breakdowns, market share, and survey responses with a few options all work well.

Avoid when: you have many categories, when the slices are nearly the same size (it becomes hard to see differences), or when you need to compare values precisely. Bar charts are often clearer for comparisons.

Histograms: Showing the Shape of Data

A histogram looks similar to a bar chart, but it serves a different purpose. Instead of comparing categories, it shows how frequently values fall into different ranges (called "bins"). The bars touch each other because the ranges are continuous.

Example

Test scores for 50 students, grouped into ranges:

  Frequency
      15 |         ████
      12 |      ████████
       9 |   ████████████
       6 |████████████████
       3 |████████████████████
       0 +---+---+---+---+---+
         50  60  70  80  90 100
              Score ranges
    

This histogram shows that most students scored in the 70-90 range, with fewer at the extremes. The data is roughly bell-shaped.

Use histograms when: you want to see the distribution or shape of numerical data - ages of customers, response times, blood pressure readings, or income levels. Histograms reveal whether data is symmetric, skewed, or has multiple peaks.

Avoid when: your data is categorical (use a bar chart instead) or when you have very few data points (the shape will not be meaningful).

Histogram vs. Bar Chart: What Is the Difference?

Bar charts compare separate categories (apple vs. banana). Histograms show continuous data grouped into ranges (60-69 vs. 70-79). In a histogram, the order matters and the bars touch. In a bar chart, you could rearrange the bars without losing meaning.

Line Graphs: Showing Change Over Time

A line graph plots data points connected by a line, making it easy to see trends, rises, and falls over time.

0 7 14 21 28 35 0-10 10-20 20-30 30-40 40-50 50-60 60-70
Example

Monthly sales (in thousands) for a small shop over 6 months:

  Sales ($K)
      25 |                  *
      20 |            *--*
      15 |      *--*
      10 |   *
       5 |
       0 +--+--+--+--+--+--+
         Jan Feb Mar Apr May Jun
    

The upward trend is clear: sales have been growing steadily each month.

Use line graphs when: you want to track how something changes over time - stock prices, website visitors, a patient's weight over months, daily temperatures. Line graphs are the go-to for time series data.

Avoid when: your data points are not connected in a meaningful order. Connecting random categories with a line suggests a trend that does not exist.

Multiple Lines

You can put multiple lines on the same graph to compare trends. For example, plotting sales for three different products on one graph lets you see which one is growing fastest. Just make sure the lines are visually distinct (different colors or patterns) so readers can tell them apart.

Scatterplots: Showing Relationships Between Two Variables

A scatterplot places a dot for each observation using two measurements - one on the horizontal axis and one on the vertical axis. This reveals whether the two variables are related.

Example

Hours studied vs. exam score for 10 students:

  Score
    95 |                     *
    85 |                *
    80 |           *  *
    75 |        *  *
    70 |     *
    65 |  *  *
    55 | *
       +--+--+--+--+--+--+--+
        1  2  3  4  5  6  7  8
             Hours studied
    

The dots trend upward from left to right, suggesting that more hours studied is associated with higher scores. This is a positive relationship.

Use scatterplots when: you want to explore whether two numerical variables are related - exercise and heart rate, advertising spending and revenue, age and blood pressure.

Avoid when: one of your variables is categorical (use a bar chart or grouped comparison instead).

Patterns in Scatterplots

  • Dots trend upward: Positive relationship (as one increases, the other tends to increase)
  • Dots trend downward: Negative relationship (as one increases, the other tends to decrease)
  • Dots show no pattern: Little or no relationship between the two variables
  • Dots curve: The relationship might not be a straight line - more advanced methods may be needed

Choosing the Right Chart: A Quick Guide

  • Comparing categories? → Bar chart
  • Showing parts of a whole? → Pie chart
  • Showing the shape/distribution of data? → Histogram
  • Tracking change over time? → Line graph
  • Exploring a relationship between two numbers? → Scatterplot

Common Mistakes to Avoid

Truncated axes: Starting a bar chart at 50 instead of 0 can make a small difference look dramatic. Always check where the axis starts.

3D effects: Adding a 3D effect to pie charts or bar charts might look fancy, but it distorts the visual proportions and makes accurate reading harder. Flat charts are almost always clearer.

Too much data in one chart: If your chart has 15 overlapping lines or 20 tiny pie slices, it is not communicating - it is confusing. Simplify or split into multiple charts.

Key Takeaway

Each chart type has a job it does best. Bar charts compare categories. Pie charts show parts of a whole. Histograms reveal the shape of numerical data. Line graphs track trends over time. Scatterplots expose relationships between two variables. Picking the right chart makes your data clear and convincing; picking the wrong one can mislead your audience - even unintentionally.