Description Usage Arguments Value Note See Also Examples
Create options structure for plotluck
1 | plotluck.options(opts, ...)
|
opts |
An (optional) named list to start with. Anything not specified in ... will be inherited from opts. |
... |
Parameters to override default settings |
A named list of options, usable as argument to function plotluck
.
plotluck
accepts a list of options to modify its behavior. Calling
plotluck.options
without arguments produces a list with the default
values. Specifying any number of attribute/value pairs overrides them
selectively.
Option | Default | Comment |
na.rm | FALSE | Do not show missing factor values as separate level. |
geom | "auto" | Override type of plot; the available types for a given formula and variables can be inspected with verbose=TRUE . |
sample.max.rows | 100000 | If the data set has more rows than that, sample it down. |
trans.log.thresh | 2 | Threshold for logarithmic axis scaling. Visible magnification factor of the central region of the distribution. |
n.breaks.histogram | NA | Override the number of histogram breaks. |
min.points.hex | 5000 | Minimum data points required to display a hexbin plot. |
min.points.density | 20 | Minimum data points required to display a density or histogram plot. |
min.points.violin | 20 | Minimum data points required to display a violin or box plot. |
resolution.heat | 30 | Grid spacing for heat maps. |
dedupe.scatter | 'area' | To represent multiple instances of the same coordinates in scatter plot: scale the point size, or use jitter? |
min.points.jitter | 3 | Minimum number of coordinate duplicates to start jittering points. |
jitter.x | 0.4 | Amount of jitter to apply in horizontal direction, as a fraction of resolution. |
jitter.y | 0.4 | Amount of jitter to apply in vertical direction, as a fraction of resolution. |
few.unique.as.factor | 5 | If a numeric variable has less than that many unique values, make it an ordered factor. |
max.factor.levels | 30 | For factors with more than that many levels, least frequent ones will be pruned into "other". |
max.factor.levels.color | 3 | Maximum number of factor levels that can be represented as colors in the same plot. |
max.factor.levels.violin | 20 | Maximum number of levels to plot violins; rather switch to box plot. |
max.factor.levels.spine.x | 20 | Maximum number of levels to plot in x-direction in a spine plot. |
max.factor.levels.spine.y | 10 | Maximum number of levels to plot in y-direction in a spine plot. |
max.factor.levels.spine.z | 5 | Maximum number of levels to represent as colors in a spine plot. |
spine.plot.margin.x | 0.05 | Horizontal gap between rectangles in a spine plot. |
spine.plot.margin.y | 0.02 | Vertical gap between rectangles in a spine plot. |
facet.max.cols | 10 | Maximum number of facet columns for conditional variables. |
facet.max.rows | 10 | Maximum number of facet rows for conditional variables. |
facet.num.wrap | 6 | Preferred number of facets for single conditional variable. |
facet.num.grid | 3 | Preferred number of facets for each of two conditional variables. |
prefer.factors.vert | TRUE | In mixed numeric/factor plots, use vertical axis for the factor. |
fill.default | "deepskyblue" | Default fill color for density and histogram plots. |
palette.brewer.seq | "YlGn" | Sequential brewer palette name. |
palette.brewer.qual | "Set1" | Qualitative brewer palette name. |
multi.entropy.order | TRUE | Use estimated conditional entropy to order multi-plots. |
multi.max.rows | 6 | Maximum number of rows for multi-plots. |
multi.max.cols | 6 | Maximum number of columns for multi-plots. |
multi.in.grid | TRUE | In multi-plots, make a page with multiple plots, or generate each one separately. |
verbose | FALSE | Print information about plot types, ordering, scaling, etc. |
plotluck
's aim is to provide a function that is usable
"out-of-the-box", with no or very little manual tweaking. If you find
yourself needing to change option values repeatedly or find the presets to
be suboptimal, please contact the author.
1 2 3 4 5 6 7 8 9 | # list all default options
plotluck.options()
data(iris)
# default with violin plot
plotluck(iris, Petal.Length~Species)
# use box-and-whiskers plot instead
plotluck(iris, Petal.Length~Species, opts=plotluck.options(geom='box'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.