Takes a data frame of treemap coordinates produced by "treemapify" and draws an exploratory treemap. The output is a ggplot2 plot, so it can be further manipulated e.g. a title added.
ggplotify(treeMap, label.colour = "white", label.type = "shrink",
label.size = 24, label.min.size = 4, label.place = NULL,
rect.border.colour = "grey", rect.border.size = 0.2,
group.labels = TRUE, group.label.colour = "grey20",
group.label.type = "shrink", group.label.size = 36,
group.label.min.size = 4, group.label.place = NULL,
group.border.colour = "grey50", group.border.size = 1.2)
A data frame of treemap coordinates produced by "treemapify"
Colour for individual rect labels; defaults to white
How the labels should be drawn inside each rect. <U+2018>shrink<U+2019>
(default) will cause the labels to be drawn at <U+2018>label.size<U+2019>, unless that
would make them too big for the rects, in which case they are shrunk to fit
the rects. <U+2018>fill<U+2019> draws the labels at the largest possible size for their
rects. See documentation for the ggfittext
package for more details.
Size for individual rect labels, in points. Defaults to 24 pt.
Any label shrunk below this size (in points) will not be drawn. Defaults to 4 pt.
Where in the rect should the label be drawn? Defaults to
<U+2018>topleft<U+2019>, unless label.type is <U+2018>fill<U+2019> in which case defaults to <U+2018>middle<U+2019>.
See ggfittext
documentation for more details.
Colour for the borders between rects. Defaults to grey.
Size (line thickness) for the borders between rects. Defaults to 0.2.
Logical indicating whether groups should be labeled. Defaults to TRUE.
Colour for group labels. Defaults to grey20.
How the group labels should be drawn inside each
group. <U+2018>shrink<U+2019> (default) will cause the labels to be drawn at <U+2018>label.size<U+2019>,
unless that would make them too big for the rects, in which case they are
shrunk to fit the rects. <U+2018>fill<U+2019> draws the labels at the largest possible size
for their rects. See documentation for the ggfittext
package for more
details.
Size for group labels, in points. Defaults to 36 pt.
Any group label shrunk below this size (in points) will not be drawn. Defaults to 4 pt.
Where in the group should the group label be drawn?
Defaults to <U+2018>bottom<U+2019>, unless group.label.type is <U+2018>fill<U+2019> in which case
defaults to <U+2018>middle<U+2019>. See ggfittext
documentation for more details.
Colour for borders around groups. Defaults to grey50.
Size (line thickness) for borders around groups. Defaults to 1.2.
Other treemapify: treemapify_fixed
,
treemapify