I am trying to make a ggplot figure with geom_bar where each value within a bar is visually separated:
What I have vs. what I'm trying to make:
It seems simple but I have not been able to find a way to accomplish it. I'm probably missing an obvious solution. Thanks in advance.
Example code:
library(ggplot2)
mydata <- data.frame(id = c("exp1", "exp2", "exp3"),
value = c(2, 4, 3)
)
ggplot(mydata, aes(x = id, y = value)) +
geom_bar(stat = "identity", fill = NA, colour = "black")


