The lie factor divides the proportional change shown in a graphic by the proportional change in the data. A value of one means those changes agree. Tufte treats values outside roughly 0.95 to 1.05 as distortion.
Usage
lie_factor(x, ...)
# S3 method for class 'numeric'
lie_factor(x, graphic, ...)
# S3 method for class 'ggplot'
lie_factor(x, ...)
# Default S3 method
lie_factor(x, ...)Value
A numeric lie factor, or NA when there's nothing to compare.
The ggplot method returns 1 for a plot with no bars or with
a zero baseline. For supported Cartesian bars it checks each panel and
returns the largest distortion, including negative and reversed axes.
Nonlinear coordinates and truncated stacked or floating bars return
NA when no supported comparison is available.
Details
Supply two numeric vectors to compare data values with the sizes drawn.
Or supply a ggplot with bars to measure the effect of a non-zero
baseline. The plot method is limited to supported bar comparisons; a result
of one isn't a general assessment of the figure's accuracy.