treemapify icon indicating copy to clipboard operation
treemapify copied to clipboard

Support `grid::pattern()` / gradient fills

Open trevorld opened this issue 1 year ago • 0 comments

{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]) with 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()))

trevorld avatar Apr 24 '24 16:04 trevorld