I have a dataframe with below structure
structure(list(Set = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("Set2",
"Set1"), class = "factor"), Subset = c("Feminine", "Masculine",
"Neutral", "Feminine", "Masculine", "Neutral"), Genderity = c(4.47,
-3.65, 1.54, 4.13, -4.03, -0.61)), row.names = c(NA, -6L), class = "data.frame")
I want to plot a likert scale sort of plot as below output
I am struggling to replicate this in ggplot 2 (below is my code, even though it gives similar output as expected The spaces in y axis are way off because I used Genderity in both x & y argument). It was giving me error if I left y argument blank
ggplot(aes(x=Genderity, y=Genderity), data=df_2, position="stack", stat="identity")+
geom_bar(stat="identity",aes(fill=Subset),position="dodge")+
coord_flip()+
geom_hline(yintercept = 0, color =c("black")) +
scale_y_continuous(breaks=seq(-5,5,1), limits=c(-5,5))+
facet_wrap(facets = .~Set, ncol = 2, nrow=1)
I know my output is really close to what I want but its not the right way to do it. Please help how to do this via ggplot 2