-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I almost have the layout I'm looking for, with 4 groups in my treemap, but no matter which corner I start from, I always get the x-axis split into two equally, but not the y-axis.
e.g.:
local({
start <- "topleft"
layout <- "squarified"
tibble::tibble(A = c(1,1,0,0),
B = c(0,1,1,0),
pct = c(0.69, 0.14, 0.06, 0.11)) %>%
dplyr::mutate(label = paste("A=", A, "\n", "B=", B, sep="")) %>%
ggplot2::ggplot(ggplot2::aes(area = pct,
subgroup = A,
subgroup2 = B,
label = label)) +
treemapify::geom_treemap(start = start, layout = layout) +
treemapify::geom_treemap_text(start = start)
})
What I'm looking for is the A=1,B=0 and A=1,B=1 groups placed along the top in boxes of equal height. I can get equal width, but not equal height and starting from different corners or reversing the subgroups doesn't seem to help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels