Lesson 1 - Understanding Graphs and Coordinates

Foundation Before Code

Before writing visualization code, you need to understand what you are creating. You cannot cook without knowing ingredients. You cannot build without understanding materials. Similarly, you cannot create effective visualizations without understanding how graphs work.

By the end of this lesson, you will be able to:

  • Identify the anatomy of a graph (x-axis, y-axis, origin)
  • Read coordinates from graphs in (x, y) format
  • Interpret unit lengths and tick marks on axes
  • Understand how data points map to coordinates
  • Recognize different scales on x and y axes

Understanding graphs is MORE important than memorizing code syntax. Once you know what you want to show, the code becomes easy.


Why Learn About Graphs First?

The Foundation of Data Visualization

Every graph tells a story through visual patterns. Before you can create graphs with code, you must understand:

  • How axes define coordinate systems
  • How points represent data
  • How to extract information from visual patterns

What You Will Learn

In this lesson, we focus on reading and interpreting graphs:

  • Coordinate system components
  • Mapping data to visual positions
  • Reading values from different scales

This foundation applies to all visualization types—line plots, scatter plots, bar charts, and more.


Anatomy of a Graph

Every graph has essential components that work together to display data visually.

The Coordinate System

      Y-Axis (Vertical)
         |
    4000 +               *
         |
    3000 +          *
         |     *
    2000 +  *
         |
    1000 +
         |
       0 +-----+-----+-----+-----+------> X-Axis (Horizontal)
         0     1     2     3     4     5
      Origin

Key Components

1. X-Axis (Horizontal Axis)

  • Usually represents independent variable
  • Examples: time, age, temperature, category
  • Values increase from left to right

2. Y-Axis (Vertical Axis)

  • Usually represents dependent variable
  • Examples: sales, count, price, measurement
  • Values increase from bottom to top

3. Origin

  • Point where axes intersect
  • Usually at (0, 0)
  • The starting reference point

4. Tick Marks

  • Small lines on axes showing values
  • Help read coordinates accurately
  • Do not have to be evenly spaced

5. Unit Length

  • Distance between tick marks
  • Can be different on x and y axes
  • Example: X-axis by 1s, Y-axis by 1000s

Critical Understanding: The unit lengths on x and y axes can be completely different. Always check both axes to understand scale.


Understanding Coordinates

Every point on a graph has a unique address in (x, y) format.

The (x, y) Format

Point A at (7, 2) means:

  • X-coordinate: 7 (distance from y-axis)
  • Y-coordinate: 2 (distance from x-axis)
    Y
    4|
    3|
    2|       A(7,2)
    1|
    0+---+---+---+---+---+---+---+-> X
     0   1   2   3   4   5   6   7

Reading Coordinates

Step 1: Find the x-value

  • Drop straight down from point to x-axis
  • Read the number where you intersect

Step 2: Find the y-value

  • Move straight left from point to y-axis
  • Read the number where you intersect

Step 3: Write as (x, y)

  • X-coordinate FIRST
  • Y-coordinate SECOND
  • Always in this order

Practical Example

Point B at (3, 5000)
- X = 3 (perhaps month 3 = March)
- Y = 5000 (perhaps 5,000 sales)
- Interpretation: "In March, there were 5,000 sales"

Coordinates translate data values into visual positions on the graph.


Reading Different Unit Lengths

Real-world data often requires different scales on each axis.

Example: COVID-19 Cases

Cases
7,000,000 +                        *
          |
6,000,000 +
          |
5,000,000 +              *
          |
4,000,000 +
          |
3,000,000 +        *
          |
2,000,000 +     *
          |
1,000,000 +  *
          |
        0 +---+----+----+----+----+----+----+-> Month
          1   2    3    4    5    6    7    8

Notice the Scales

  • X-axis: Units of 1 (months: 1, 2, 3…)
  • Y-axis: Units of 1,000,000 (cases: 1M, 2M, 3M…)
  • Very different scales

Why Different Scales?

Practical Reason: Data values have different ranges.

  • Months: 1 to 12 (small range)
  • COVID cases: Millions (large range)

If we used the same scale for both axes, the graph would be impossible to read. The x-axis would stretch for millions of units just to show 12 months.

Reading This Graph

Point at (4, 2,336,640):

  • Month 4 = April
  • 2,336,640 new cases
  • Interpretation: “In April, there were about 2.3 million new COVID cases”

Key Insight: Always check BOTH axes to understand what numbers represent.


Practice Exercises

Apply your understanding of graph components and coordinates.

Exercise 1: Identify Components

Revenue ($)
  50000 +                    *
        |
  40000 +              *
        |
  30000 +        *
        |
  20000 +   *
        |
  10000 +
        |
      0 +----+----+----+----+-----> Quarter
        Q1   Q2   Q3   Q4   Q5

Questions:

  1. What is on the x-axis?
  2. What is on the y-axis?
  3. What is the origin?
  4. What are the unit lengths on each axis?
  5. What are the coordinates of the highest point?

Answers:

  1. Quarter (time period)
  2. Revenue in dollars
  3. (Q1, 0) or (0, 0)
  4. X-axis: 1 quarter, Y-axis: $10,000
  5. (Q5, 50000) - “In Q5, revenue was $50,000”

Exercise 2: Read Coordinates

Temperature (C)
   30 +              *D
      |
   25 +        *C
      |
   20 +  *B
      |
   15 +*A
      |
   10 +
      |
    0 +---+---+---+---+----> Hour
      0   6  12  18  24

Find the coordinates:

  1. Point A: (0, 15) - “At midnight, temperature was 15 degrees C”
  2. Point B: (6, 20) - “At 6am, temperature was 20 degrees C”
  3. Point C: (12, 25) - “At noon, temperature was 25 degrees C”
  4. Point D: (18, 30) - “At 6pm, temperature was 30 degrees C”

Interpretation: Temperature increased throughout the day, peaking at 6pm.


Exercise 3: Different Scales

Users
1,000,000 +                        *
          |
  750,000 +              *
          |
  500,000 +        *
          |
  250,000 +   *
          |
        0 +---+---+---+---+-> Year
          2020 2021 2022 2023 2024

Questions:

  1. What is the x-axis unit length?
  2. What is the y-axis unit length?
  3. At what point are there 500,000 users?
  4. How many users in 2024?
  5. By how much did users increase from 2020 to 2024?

Answers:

  1. 1 year
  2. 250,000 users
  3. (2022, 500000)
  4. 1,000,000 (1 million)
  5. 750,000 increase (from 250,000 to 1,000,000)

Practice Challenge

Before moving to the next lesson, try these challenges:

Challenge 1: Draw Your Own Graph

Create axes for: “Hours Studied vs Exam Score”

  • X-axis: 0 to 10 hours (units of 2)
  • Y-axis: 0 to 100 score (units of 20)
  • Plot these points: (2,40), (4,60), (6,75), (8,85), (10,95)
  • What pattern do you see?

Challenge 2: Real Data Interpretation

Find any graph in a news article:

  • Identify x and y axes
  • Read 3 coordinates
  • Explain what the pattern shows

Challenge 3: Predict Next Point

Given points at (1,100), (2,200), (3,300), (4,400):

  • What would you expect at x=5? Why?
  • This is the power of visualization: seeing patterns

Summary

You now understand the fundamental components of graphs. Let’s review the key concepts.

Key Concepts

Graph Anatomy

  • X-axis (horizontal) and Y-axis (vertical)
  • Origin where axes meet
  • Tick marks show values
  • Unit lengths can differ between axes

Reading Coordinates

  • Format is always (x, y)
  • X-coordinate first, Y-coordinate second
  • Find x by dropping to x-axis
  • Find y by moving to y-axis

Different Scales

  • Axes can have different unit lengths
  • Small values (months) vs large values (millions)
  • Always check axis labels
  • Scales chosen to fit data range

Data to Visual Translation

  • Every data point becomes a coordinate
  • Position on graph represents value
  • Patterns in data create visual patterns

Important Reminders

  • Always check scales: Unit lengths differ between axes
  • Read labels carefully: Understand what each axis represents
  • Look for patterns: Trends, increases, decreases, cycles
  • Context matters: Coordinates alone are not enough—axis labels provide meaning

Next Steps

You have built the foundation for all data visualization. In the next lesson, you will create your first plots with Matplotlib and translate data into visual coordinates using code.

Continue to Lesson 2 - Introduction to Matplotlib

Create your first plots with pyplot and understand the visualization workflow

Review Pandas Module

Refresh data manipulation skills before visualization


Master the Foundation

Understanding graphs comes before creating graphs. You have just built the essential foundation for all data visualization work.

Use this knowledge to read any graph with confidence!