inst/charts/27.R

library(treemap)
library(treemapify)
library(ggplot2)
library(dplyr)

data('GNI2014')

chart <- ggplot(GNI2014, aes(area = population, fill = continent, label = country,
                    subgroup = continent)) +
  geom_treemap() +
  geom_treemap_subgroup_border() +
  geom_treemap_subgroup_text(place = 'centre', grow = F, alpha = .25, colour =
                               'white', fontface = 'italic', min.size = 0) +
  geom_treemap_text(colour = 'black', place = 'topleft', reflow = T) +
  writer::graph_theme(legend.position = 'none')
NicolasJBM/writer documentation built on Aug. 12, 2019, 2:36 p.m.