Closed trevorld closed 2 months ago
{ggplot2} 3.5.0 geoms were updated to accept grid::pattern() / gradient fills. geom_treemap() could also be updated to accept such fills:
{ggplot2}
grid::pattern()
geom_treemap()
fill = ggplot2::alpha(data$fill[i], data$alpha[i])
fill = 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()))
Thanks, added to the development version in 082641a
{ggplot2}
3.5.0 geoms were updated to acceptgrid::pattern()
/ gradient fills.geom_treemap()
could also be updated to accept such fills: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: