I want to create a dashed line between facet grid ggplot2 plot.
data_people <- data.frame(Group = c("Good", "Medium", "Medium", "Medium", "Medium", "BAD", "BAD", "BAD", "BAD"),
people = c("Jonney", "Eva", "Eilse", "Doe", "Matt", "June", "Som", "Clara","Nick"),
number = c(0.04, 0.09, 0.10, 0.13, 0.13, 0.06, 0.05, 0.00, 0.3))
library(ggplot2)
library(ggstance)
ggplot(data = data_people, aes(x = number, y = people, group = Group)) +
geom_barh(stat = "identity", colour = "black") +
scale_x_continuous(breaks = c(-0.20, 0.00, 0.20, 0.40, 0.60, 0.80, 1.00),
limits = c(-0.20, 1)) +
facet_grid(Group~., scales = "free_y", space = "free_y", switch = 'y') +
xlab(" ") +
ylab(" ")
What I get is this Figure.
What I want to get is this Figure.