The geom_col
on this data set returns values
in dat
for each name
. What I think you'd prefer is that it also return a second value
, which requires a pair of name
s for each. (A at a given height can't be both +1.23 and -4.56 at the same time if we're limited to using only one bar.)
This post illustrates my recommended way to build up a ggplot
to avoid getting tied up in knots by trying to do it all in one pass.
I don't have Winston Chang's R Graphics Cookbook
to hand, and don't do this type of plot often enough to have a snippet, but I'll come back if I find it.