1. Introduction - Fundamentals of Data Visualization [Book]
1. Introduction - Fundamentals of Data Visualization [Book]
See everything available through the O’Reilly learning platform and star Search
Chapter 1. Introduction
Data visualization is part art and part science. The challenge is to get the art right
without getting the science wrong, and vice versa. A data visualization first and
foremost has to accurately convey the data. It must not mislead or distort. If one
number is twice as large as another, but in the visualization they look to be about
the same, then the visualization is wrong. At the same time, a data visualization
should be aesthetically pleasing. Good visual presentations tend to enhance the
message of the visualization. If a figure contains jarring colors, imbalanced visual el‐
ements, or other features that distract, then the viewer will find it harder to inspect
the figure and interpret it correctly.
The book is divided into three parts. The first, “From Data to Visualization,” de‐
scribes different types of plots and charts, such as bar graphs, scatterplots, and pie
charts. Its primary emphasis is on the science of visualization. In this part, rather
than attempting to provide encyclopedic coverage of every conceivable visualiza‐
tion approach, I discuss a core set of visuals that you will likely encounter in publi‐
cations and/or need in your own work. In organizing this part, I have attempted to
group visualizations by the type of message they convey rather than by the type of
data being visualized. Statistical texts often describe data analysis and visualization
by type of data, organizing the material by number and type of variables (one con‐
tinuous variable, one discrete variable, two continuous variables, one continuous
and one discrete variable, etc.). I believe that only statisticians find this organiza‐
tion helpful. Most other people think in terms of a message, such as how large
something is, how it is composed of parts, how it relates to something else, and so
on.
The second part, “Principles of Figure Design,” discusses various design issues that
arise when assembling data visualizations. Its primary but not exclusive emphasis is
on the aesthetic aspect of data visualization. Once we have chosen the appropriate
type of plot or chart for our dataset, we have to make aesthetic choices about the
visual elements, such as colors, symbols, and font sizes. These choices can affect
both how clear a visualization is and how elegant it looks. The chapters in this sec‐
ond part address the most common issues that I have seen arise repeatedly in prac‐
tical applications.
The third part, “Miscellaneous Topics,” covers a few remaining issues that didn’t fit
SIGN IN TRY NOW
into the first two parts. It discusses file formats commonly used to store images and
plots, provides thoughts about the choice of visualization software, and explains
how to place individual figures into the context of a larger document.
Ugly
Bad
Wrong
Figure 1-1. Examples of ugly, bad, and wrong figures. (a) A bar plot showing three values (A = 3, B = 5,
and C = 4). This is a reasonable visualization with no major flaws. (b) An ugly version of part (a). While
the plot is technically correct, it is not aesthetically pleasing. The colors are too bright and not useful.
The background grid is too prominent. The text is displayed using three different fonts in three different
sizes. (c) A bad version of part (a). Each bar is shown with its own y axis scale. Because the scales don’t
align, this makes the figure misleading. One can easily get the impression that the three values are
closer together than they actually are. (d) A wrong version of part (a). Without an explicit y axis scale,
the numbers represented by the bars cannot be ascertained. The bars appear to be of lengths 1, 3, and
2, even though the values displayed are meant to be 3, 5, and 4.
I am not explicitly labeling good figures. Any figure that isn’t labeled as flawed
should be assumed to be at least acceptable. It is a figure that is informative, looks
appealing, and could be printed as is. Note that among the good figures, there will
still be differences in quality, and some good figures will be better than others.
I generally provide my rationale for specific ratings, but some are a matter of taste.
In general, the “ugly” rating is more subjective than the “bad” or “wrong” rating.
Moreover, the boundary between “ugly” and “bad” is somewhat fluid. Sometimes
poor design choices can interfere with human perception to the point where a “bad”
rating is more appropriate than an “ugly” rating. In any case, I encourage you to de‐
SIGN IN TRY NOW
velop your own eye and to critically evaluate my choices.
Press releases
Media coverage
Community partners
WATCH ON YOUR BIG SCREEN
Affiliate program
View all O’Reilly videos, Superstream events, and Meet
Submit an RFP
the Expert sessions on your home TV.
Diversity
SUPPORT
DO NOT SELL MY PERSONAL INFORMATION
Contact us
Newsletters
Privacy policy
INTERNATIONAL
Australia & New Zealand SIGN IN TRY NOW
India
Indonesia
Japan
© 2025, O’Reilly Media, Inc. All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to
earn fees by linking to Amazon.com and affiliated sites.
Terms of service • Privacy policy • Editorial independence