treemapify
treemapify copied to clipboard
Support `grid::pattern()` / gradient fills
{ggplot2} 3.5.0 geoms were updated to accept grid::pattern() / gradient fills. geom_treemap() could also be updated to accept such fills:
- [ ] Bump required ggplot2 version number to v3.5
- [ ] Replace code like
fill = ggplot2::alpha(data$fill[i], data$alpha[i])withfill = ggplot2::fill_alpha(data$fill[i], data$alpha[i])
A non-interesting minimal example that ideally wouldn't throw an error:
library("ggplot2")
library("treemapify")
stopifnot(isTRUE("TilingPattern" %in% dev.capabilities()$patterns))
ggplot(G20, aes(area = gdp_mil_usd)) +
geom_treemap(fill = grid::pattern(grid::circleGrob()))