Usage
personograph(data, fig.title = NULL, fig.cap = NULL, draw.legend = T, icon = NULL, icon.dim = NULL, icon.style = 1, n.icons = 100, plot.width = 0.75, dimensions = ceiling(sqrt(c(n.icons, n.icons))), fudge = 0.0075, legend.show.zeros = TRUE, force.fill = "ignore", round.fn = round.standard, colors = as.colors(data))
Arguments
data
A list of names to percentages (from 0 to 1)
draw.legend
Logical if TRUE (default) will draw the legend
icon
A grImport
Picture
for the icon, overwrites icon.style
icon.dim
The dimensions of icon as a vector c(width, height)
as numerical. Calculated from the dimensions
if not supplied
icon.style
A numeric from 1-11 indicating which of the included icons to use, they are mostly variations on the theme
n.icons
Number of icons to draw, defaults to 100
plot.width
The percentage of width that the main plotting area should take (with respect to the frame)
dimensions
A vector of c(rows, columns)
for the dimensions of the grid
fudge
Fudge factor for the icon size, substracted from the icon.size
legend.show.zeros
Logical if TRUE indicating whether to show zero (0) values in the legend.
force.fill
A character vector of 'ignore' (default), 'most', 'least', or one of the names from data
.
Defines the behaviour for cases when the rounding doesn't add
up to n.icons
. 'ignore' simply draws less icons, 'most' adds an
icon to the largest group, 'least' to the smallest.
If a name from data
is supplied it will added to that element
round.fn
Function that is applied to round the percentages from data
to n.icons
. See also force.fill
colors
A vector of names to colors, must match the names in data. Uses gray.colors
style if none supplied