wilkox / treemapify

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

Optional rounded rects based on a user request #39

Closed hrbrmstr closed 4 years ago

hrbrmstr commented 4 years ago

Greetings!

Long-time user, first time PR-er! (👍🏽📦!)

A random inquiry hit my emailbox from a user who asked how to make rounded rect versions of {treemapify} treemaps. I prbly received the req b/c of rounded rect options in {statebins} and {ggchicklet} packages (I get these types of requests more than you might imagine).

The PR adds a radius parameter that is initially 0 (in grid::units) so as to keep the original functionality (proper hard-corner rects) in-place.

The following is an example with radius = unit(5, "pt"), size = 2, color = "white"

image

checks pass locally but we'll see what travis says abt things in a bit.

no worries if you rly don't want rounded rects (i remain unconvinced of their efficacy but folks seem to like soft corners, so… 🤷🏽‍♂️).

wilkox commented 4 years ago

Thanks, this is great!