Utility function for creating a "map of the market" visualization.
Creates a treemap where rectangular regions of different size, color,
and groupings visualize the stocks in a portfolio.
Usage
map.market(id, area, group, color,
scale = NULL,
lab = c("group"=TRUE, "id"=FALSE),
main = "Map of the Market",
print = TRUE)
Arguments
id
A vector storing the labels to be used for each stock.
area
A vector storing the values to be used to calculate the
areas of rectangles.
group
A vector specifying the group (i.e. country, sector,
etc.) to which each stock belongs.
color
A vector storing the values to be used to calculate the
color of rectangles.
scale
An object of class numeric indicating the scale
to be used in determining colors.
lab
A logical vector of length 2 specifying whether group and
stock labels should be drawn. If the two values are the same, the
second may be omitted.
main
A title for the plot.
print
An object of class logical indicating whether the
map should be drawn.