R/xfaostat_visualization_funcs.R
treemap_wrapper.Rd
See https://cran.r-project.org/web/packages/treemap/index.html for the details of the treemap function
treemap_wrapper(
.DF,
.Depth = 2,
.Palette = "Set2",
.FigTitle,
.FigTitleSize = 12,
.LastLabelCol = "orange",
.SaveDir = "../man/figures",
.SaveName,
.SaveScaler = 1
)
Input data frame. The data frame needs to include index columns (need to be first columns) and a value column.
Grouping depth of the tree; the columns will be used. The first 2 columns in .DF will be index in treemap
Color palette (RColorBrewer is used)
Figure title
Size of title font
Color of the last label
The directory for saving the plot; the default is man/figures.
Name of the saved png file in .SaveDir
A scaler controling the size (dpi = 300)
A saved plot in .SaveDir