treemap

treemap

A treemap is a space-filling visualization of hierarchical structures. This package offers great flexibility to draw treemaps.

CRAN project home

?View Code RSPLUS
# install the package from CRAN
install.packages("treemap", dependencies=c("Depends", "Imports"))
 
# or install the latest development version:
library(devtools); install_github("treemap", username="mtennekes", subdir="pkg")
 
# load the tabplot package
library(treemap)
 
# load GNI dataset
data(GNI2010)
 
# plot it!
treemap(GNI2010,
    index=c("continent", "iso3"),
    vSize="population",
    vColor="GNI",
    type="value")