How can I set inward facing bar labels in a bar chart with positive and negative values in ggplot2? I.e. the bar labels should be facing the 0 axis.
df <- data.frame(trt = c("a", "b", "c", "d"),
outcome = c(2.3, 1.9, 0.5, -0.5))
ggplot(df, aes(trt, outcome, label = outcome)) +
geom_bar(stat = "identity",
position = "identity") +
geom_text(vjust = "inward", color = 'red')
vjust = "inward"
is obviously not the way to go, since "Inward and outward are relative to the physical middle of the plot, not where the 0 axes are".
Update: