- treemap
(treemapResult) Either a voronoiResult or sunburstResult
object that contains polygons and metadata as output from running
voronoiTreemap or sunburstTreemap.
- levels
(numeric) A numeric vector representing the hierarchical levels
that are drawn. The default is to draw all levels.
- color_type
(character) One of "categorical", "cell_size", "both", or "custom_color".
For "categorical", each cell is colored based on the (parent) category it belongs.
Colors may repeat if there are many cells. For "cell_size", cells are colored
according to their relative area. For "both", cells are be colored the same
way as for "categorical", but lightness is adjusted according to cell area.
For "custom_color", a color index is used that was specified by
custom_color during treemap generation. Use NULL to omit drawing colors.
- color_level
(numeric) A numeric vector representing the hierarchical level
that should be used for cell coloring. Must be one of levels.
Default is to use the lowest level cells for Voronoi treemaps and all levels
for sunburst treemaps.
- color_palette
(character) A character vector of colors used to fill cells.
The default is to use rainbow_hcl
- color_steps
(numeric) Approximate number of steps for the color gradient
to be used when drawing cells with color_type = "cell_size".
Default step number is 10, and final step number can a vary a bit because
pretty() is used to calculate a decent color range.
- border_level
(numeric) A numeric vector representing the hierarchical level that should be
used for drawing cell borders, or NULL to omit drawing borders, The default is
that all borders are drawn.
- border_size
(numeric) A single number indicating initial line width of the highest level
cells. Is reduced each level, default is 6 pts. Alternatively a vector of
length(border_level), then each border is drawn with the specified width.
- border_color
(character) A single character indicating color for cell borders,
default is a light grey. Alternatively a vector of length(border_level),
then each border is drawn with the specified color.
- label_level
(numeric) A numeric vector representing the hierarchical level that should be
used for drawing cell labels, or NULL to omit drawing labels. The default is the
deepest level (every cell has a label).
- label_size
(numeric) A single number indicating relative size of each label
in relation to its parent cell. Alternatively a numeric vector of
length(label_level) that specifies relative size of labels for each level
individually.
- label_color
(character) A single character indicating color for cell labels.
Alternatively a vector of length(label_level), then each label
is drawn with the specified color.
- label_autoscale
(logical) Whether to automatically scale labels based on
their estimated width. Default is TRUE.
- title
(character) An optional title, default to NULL.
- title_size
(numeric) The size (or 'character expansion') of the title.
- title_color
(character) Color for title.
- legend
(logical) Set to TRUE if a color key should be drawn. Default is FALSE.
- legend_position
(character) The position of the legend, one of "left" (default),
"right", "top", or "bottom".
- legend_size
(numeric) The relative size of the legend (0 to 1), default is 0.1.
- custom_range
(numeric) A numeric vector of length 2 that can be used
to rescale the values in custom_color to the range of choice.
The default is NULL and it only has an effect if custom_color
was specified when generating the treemap.
- width
(numeric) The width (0 to 0.9) of the viewport that the treemap will occupy.
- height
(numeric) The height (0 to 0.9) of the viewport that the treemap will occupy.
- layout
(numeric) Vector of length 2 indicating the number of rows and columns
that the plotting area is supposed to be subdivided in. Useful only together with
position, which indicates the position of the specific treemap. Use add = TRUE
to omit starting a new page every time you call drawTreemap().
- position
(numeric) Vector of length 2 indicating the position where the current
treemap should be drawn. Useful only together with layout, which indicates
the number of rows and columns the plotting area is subdivided into. Use add = TRUE
to omit starting a new page every time you call drawTreemap().
- add
(logical) Defaults to FALSE, creating a new page when drawing
a treemap. When multiple treemaps should be plotted on the same page, this should be
set to TRUE, and position of treemaps specified by layout and position arguments.