prepLegendMarigins | R Documentation |
Calculate margin needed to plot a NicePlots legend
prepLegendMarigins(
x,
by,
theme,
legend,
pointHighlights = FALSE,
subgroup = TRUE,
stack = FALSE,
is2D = FALSE,
preferMulti = FALSE,
maxSize = FALSE,
sizeColumn = FALSE
)
x |
numeric vector or data frame; The input to |
by |
factor or data frame of factors; used as the primary grouping factor and the factor levels will be used as group names if |
theme |
list object; Themes are are an optional way of storing graphical preset options that are compatible with all nicePlot graphing functions. |
legend |
character; Title for the legend column. Set to |
pointHighlights |
logical; Is pointHightlights turned on? This is used to determine with column of |
subgroup |
subgroup logical; use additional column in |
stack |
logical; Used for stack stacked bar plots. Used exclusively by |
is2D |
logical; Is this for a 2D scatterplot or density plot? The first column of |
preferMulti |
logical; Are multiple legends preferred |
maxSize |
numeric; This is largest size scaling value for size scale legends. Defaults to |
sizeColumn |
numeric; This indicates which column should be used for the size scaling. |
This is a utility function used by the window setup routines to calculate how much space the legend will take up in the margin and setting the par(mai)
accordingly.
Does not return a value but changes the global par(mai)
settings.
TODO<-1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.