I'm building on a previous question that got answered, but now I am struggling to apply this to my problem. I have the following data:
cluster <- c("Joe", "Sam", "Bob")
var1 <- c(22.9, 0, 0)
var2 <- c(57.8, 0, -25.1)
var3 <- c(45.9, -25.5, 63.9)
data <- as.data.frame(
cbind (cluster, var1, var2, var3)
)
I'd like to make a facet wrap of a lollipop diagram where there are three lollipop diagrams like on this page, where each facet is Joe, Sam, and Bob; the variable names var1, var2, and var3 are on the left hand side, and each lollipop is a segment connecting the value for each key-value pair (Joe-var3 = 45.9) to zero in the center.
I think following code full-fills most of your requirement. You may adjust detailed settings (color, background.....)