So this is the following code I used to create a side-by-side bar graph like this:
california %>%
pivot_longer(4:6, names_to = "Size", values_to = "Num.Sold") %>%
select(-c(AveragePrice)) %>%
ggplot(aes(x=region,y=Num.Sold,fill=Size))+
geom_col(position = "fill")+
facet_wrap(~type)+
scale_fill_discrete(breaks=c("Small","Large","Extra Large"))
However, when I plotted the graph, my legend does not show up.
Does anybody know how to remedy this issue? Thanks!