wilkox / treemapify

🌳 Draw treemaps in ggplot2
http://wilkox.org/treemapify
213 stars 18 forks source link

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

Closed trevorld closed 2 months ago

trevorld commented 4 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:

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()))
wilkox commented 2 months ago

Thanks, added to the development version in 082641a