I would like to make a graph with bar plot zooming in chains to illustrate proportions, like this:
I tried with ggplot and ggforce (with facet_zoom) but I couldn't find how to do it.
Here are the sample data:
structure(list(name = c("other", "Housing owner occupied", "Housing rented",
"Housing owner living at home", "Housing owner living elsewhere",
"Housing owner living in Brussels", "Housing owner living outside Brussels"
), nbr = c(10000L, 170000L, 270000L, 50000L, 220000L, 110000L,
110000L), no_bar = c(1L, 1L, 1L, 2L, 2L, 3L, 3L)), class = "data.frame", row.names = c(NA,
-7L))
Here is my code for ggplot graph but I don't get to have the zoom:
ggplot(data=d, aes(x=no_bar, y=nbr, fill=name)) +
geom_bar(stat="identity")