What Is a Graph? Definition, Parts and Examples
By Dr. Zubair Khalid, DVM, MS, PhD ·

A graph is a visual display that maps data values to positions in space so you can compare them quickly. In data visualization, the term usually means a chart with at least one axis, a scale, and labels that tell the reader what the numbers represent. Understanding what a graph is comes down to understanding how those parts work together.
Quick Answer
- A graph plots data values as positions, lines, or bars inside a coordinate system.
- Its core parts are the axes, the scales, the tick marks, the labels, and the data marks themselves.
- The x-axis usually holds categories or an independent variable, and the y-axis holds the measured value.
- The scale sets the mapping from data values to screen positions, so a scale from 0 to 200 places the value 150 three-quarters of the way up.
- Labels and ticks make the graph readable without guessing, and they are what separate a graph from a decorative picture.
What a Graph Means
In everyday use, a graph is any picture of data. In data visualization, the definition is tighter. A graph is a set of data marks placed in a coordinate system, where each mark's position is determined by one or more data values.
The precise statistical definition adds the mapping. A graph is a function that assigns each data value to a position on a scale, plus the visual elements (axes, ticks, labels, marks) that let a reader recover the value from the position. That mapping is what makes a graph readable. If you can look at a mark and estimate its value, the graph is doing its job.
This matters because the same data can be drawn many ways. Cleveland and McGill studied how accurately people read different graphical encodings and found that position along a common scale is judged more accurately than length, angle, or area [1]. That finding is why bar charts and dot plots, which rely on position, tend to be easier to read than pie charts, which rely on angle and area.
How It Works
A graph works by mapping data values to positions through a scale. For a single axis, the mapping is a linear function:
$$p = p_0 + \frac{v - v_{\min}}{v_{\max} - v_{\min}} \times (p_1 - p_0)$$
Each symbol means the following:
- $v$ is the data value you want to place.
- $v_{\min}$ and $v_{\max}$ are the smallest and largest values the axis covers.
- $p_0$ and $p_1$ are the pixel positions of the axis start and end.
- $p$ is the resulting position of the mark on screen.
If the axis runs from 0 to 200 and the value is 150, then the fraction is $150 / 200 = 0.75$, so the mark sits 75 percent of the way along the axis. That is the whole mechanism. Everything else in a graph exists to help the reader reverse that calculation by eye.
Axes and ticks do that reversing work. Krzywinski explains that ticks mark the values a reader can anchor to, and grids extend those anchors across the plot area [2]. Labels name the variable and its unit, so a reader knows whether 150 means dollars, units, or seconds. Plotting symbols carry the remaining meaning, such as which group a point belongs to [3].
Worked Example
Take a small dataset of monthly sales for the first six months of the year.
| month | sales |
|---|---|
| Jan | 120 |
| Feb | 145 |
| Mar | 132 |
| Apr | 168 |
| May | 155 |
| Jun | 190 |
The steps to turn this into a graph are straightforward.
- Data table (month, sales): Jan=120, Feb=145, Mar=132, Apr=168, May=155, Jun=190.
- Number of data points: n = 6.
- Sum of sales: 120 + 145 + 132 + 168 + 155 + 190 = 910.
- Mean sales: 910 / 6 = 151.6667.
- Y-axis range: y from 0 to 200, with ticks at [0, 50, 100, 150, 200].
- X-axis categories: Jan, Feb, Mar, Apr, May, Jun.
Here is the code that draws it.
import matplotlib.pyplot as plt
months = ['Jan','Feb','Mar','Apr','May','Jun']
sales = [120,145,132,168,155,190]
fig, ax = plt.subplots()
ax.bar(months, sales, color='#1d4ed8')
ax.set_xlabel('Month'); ax.set_ylabel('Sales (units)')
ax.set_title('Monthly Sales')
ax.set_ylim(0, 200); ax.set_yticks(range(0, 201, 50))
ax.axhline(sum(sales) / len(sales), linestyle='--', color='gray') # mean = 151.6667
plt.show()
Output: a bar chart with 6 bars, mean sales = 151.6667.
The figure shows 6 monthly sales values (Jan, Feb, Mar, Apr, May, Jun) with a labeled x-axis (Month), a labeled y-axis (Sales), tick marks, a title, and a dashed mean line at 151.67.
Notice how each part earns its place. The x-axis holds the categories. The y-axis holds the measured value. The scale from 0 to 200 keeps every bar inside the frame and gives the reader round numbers to anchor to. The mean line at 151.67 gives a reference point, so you can see at a glance that April, May, and June sit above average while January, February, and March sit below.
How to Interpret It
Read a graph in three passes. First, read the axes. Find the variable names and units, then check the range. A y-axis that starts at 0 and one that starts at 100 tell very different stories about the same numbers.
Second, read the scale and ticks. Round tick values make estimation easier. If the ticks are at 0, 50, 100, 150, and 200, you can place a bar at 145 as just under the 150 line.
Third, compare the marks. In the worked example, June is the tallest bar at 190, and January is the shortest at 120. The gap between them is 70 units, which is a bit less than half the mean. That comparison is the reason the graph exists.
Weissgerber and colleagues point out that how you summarize data changes what the reader sees, and that showing the underlying values or distribution often communicates more than a single summary bar [4]. When you interpret a graph, ask what each mark represents. One bar per month is clear. One bar per group hides how many observations went into it.
When to Use It (and when not to)
Use a graph when you need to compare values, show a trend over time, or reveal a distribution. Position-based graphs such as bar charts, line charts, and dot plots are the workhorses because readers judge position accurately [1].
Use a graph when the audience needs to estimate values, not just see a shape. Axes, ticks, and labels make estimation possible [2].
Do not use a graph when a table would be clearer. If you have four numbers and the exact values matter more than the comparison, a table wins. Do not use a graph to decorate a report. A chart with no axis labels or no scale is a picture, not a graph, and readers cannot recover any values from it.
Graph vs Chart
People use these words interchangeably, but they are not identical. A graph is a chart built on a coordinate system with at least one scaled axis. A chart is the broader category that includes graphs plus maps, diagrams, and other visual displays.
| Feature | Graph | Chart |
|---|---|---|
| Coordinate system | Required | Optional |
| Scaled axis | At least one | Not always |
| Typical examples | Bar chart, line chart, scatter plot | Pie chart, map, flowchart, gauge |
| Value estimation | Possible from position | Often not possible |
| Best for | Comparing quantities | Showing parts of a whole or layout |
If you can read a number off the picture, you are looking at a graph. If you can only read a category or a share, you are looking at a chart. For a fuller breakdown, see Chart vs Graph: Differences and When to Use Each.
Common Mistakes
- Truncating the y-axis on a bar chart. Starting the axis at 100 instead of 0 exaggerates small differences. Fix it by starting bar charts at 0, since bar length encodes the value.
- Leaving off units. A y-axis labeled "Sales" does not say whether that means units, dollars, or thousands. Fix it by writing "Sales (units)" or "Revenue (USD)".
- Using too many tick marks. Ticks every 5 units on a 0 to 200 axis create clutter. Fix it by choosing round intervals such as 50.
- Mixing scales on one axis. Plotting two variables with different units on a single y-axis makes the comparison meaningless. Fix it by using two labeled axes or two separate panels.
- Hiding the sample size. A bar built from 3 observations looks the same as one built from 3,000. Fix it by reporting n or showing the individual points [4].
- Relying on color alone. Readers with color vision differences may miss the distinction. Fix it by adding shape or direct labels to the marks [3].
Limitations
A graph compresses data, and compression loses information. A bar chart of monthly totals cannot show how many transactions made up each month, whether the values were steady or spiky, or whether any outliers were removed. Two datasets with the same mean and the same bar heights can have completely different distributions.
Graphs also depend on the reader's judgment. Estimating a value from a position is accurate but not exact, and accuracy drops when the encoding shifts from position to angle or area [1]. A graph is a tool for comparison, not a substitute for the underlying numbers. When precision matters, pair the graph with a table.
Frequently Asked Questions
What is a graph in simple terms?
A graph is a picture of data where each value is placed at a position on a scale. The axes, ticks, and labels tell you what the positions mean. If you can look at a mark and estimate its value, you are reading a graph.
What are the main parts of a graph?
The main parts are the x-axis, the y-axis, the scales, the tick marks, the axis labels, the title, and the data marks such as bars, points, or lines. Ticks give readers anchor values, and labels name the variables and units [2].
What is the difference between a scale and an axis?
The axis is the line or edge where values are placed. The scale is the rule that maps data values to positions along that axis. An axis from 0 to 200 with ticks every 50 is a line plus a scale.
Does a graph always need a y-axis?
No. A dot plot or a strip plot can show a distribution along a single axis. But any graph that compares quantities across categories needs a scaled axis so readers can estimate the values.
Why do axis labels matter so much?
Labels tell the reader what the numbers mean and in what unit. Without them, a bar at 190 is just a shape. With a label reading "Sales (units)", the reader knows exactly what was measured [2].
References
- Cleveland WS, McGill R (1984). Graphical Perception: Theory, Experimentation, and Application to the Development of Graphical Methods. Journal of the American Statistical Association
- Krzywinski M (2013). Axes, ticks and grids. Nature Methods
- Krzywinski M, Wong B (2013). Plotting symbols. Nature Methods
- Weissgerber TL, Milic NM, Winham SJ et al. (2015). Beyond Bar and Line Graphs: Time for a New Data Presentation Paradigm. PLOS Biology
Further Reading
- Rougier NP, Droettboom M, Bourne PE (2014). Ten Simple Rules for Better Figures. PLoS Computational Biology
- NIST/SEMATECH e-Handbook: Graphical Techniques