07 - Principles of Visualizing Data
07 - Principles of Visualizing Data
Steven Skiena
Stony Brook University
Always properly
label your axes.
Use continuous
scales: linear or
labelled!
Aspect Ratios and Lie Factors
The steepness of
apparent cliffs is a
function of aspect
ratio.
Aim for 45° lines
or Golden ratio as
most interpretable.
Can this be the Same Data?
Reduce Chartjunk
Extraneous visual elements distract from the
message the data is trying to tell.
● Extra dimensionality
● Uninformative coloring
● Excessive grids and figurative decoration
In an exciting graphic, the data tells the story,
not the chartjunk.
Can you Simplify this Plot?
Tim Brey
Can You Further Simplify?
Better, but can you Further Simplify?
Anything Else that Can Go?
``Less is More’’
MatPlotLib Supports Nice Plots
Which
Chart to
Use?
Tabular Data
Tables can have advantages over plots:
● Representation of numerical precision
● Understandable multivariate visualization:
each column is a different dimension.
● Representation of heterogeneous data
● Compactness for small numbers of points.
Can this Table be Improved?
Dimensions for Improvement
● Order rows to invite comparisons.
● Order columns to highlight importance or
pairwise relationships.
● Right justify uniform-precision numbers
● Use emphasis, font, or color to highlight
important entries.
● Avoid excessive-length column descriptors.
Improved Tabular Presentation
Line Charts
● Show data points, not
just fits.
● Line segments show
connections, so do not
use in categorical data.
● Connecting points by
lines is often chartjunk.
Better is usually a trend
line or fit with the data
points.
Scatter Plots / Multivariate Data
Scatter plots show the values of each point, and
are a great way to present 2D data sets.
Higher dimensional datasets are often best
projected to 2D, through self-organizing maps or
principle component analysis, although can be
represented through bubble plots.
Reduce Overplotting by Small Points
Heatmaps Reveal Finer Structure
Color points on the basis of frequency
Bubble Charts for Extra Dimensions
Using color, shape, size, and
shading of “dots” enables dot
plots to represent additional
dimensions.
http://www.gapminder.org/vid
eos/200-years-that-changed-
the-world-bbc/
Bar Plots vs. Pie Charts
Bar plots show the frequency of proportion of
categorical variables. Pie charts use more
space and are harder to read and compare.
Partitioning each bar into pieces yields
the stacked bar chart.