Package/ {ggplot2} option a-z

option in {ggplot2}

option Description Example Notes
alpha= Alpha transparency for overlapping elements expressed as a fraction between 0 (complete transparency) and 1 (complete opacity) alpha=0.5
color= Associates the levels of variable with symbol color, shape, or size. For line plots, color associates levels of a variable with line color. For density and box plots, fill associates fill colors with a variable. Legends are drawn automatically.
data= Specifies a data frame
facets=
= rowvar ~ colvar Creates a trellis graph by specifying conditioning variables.
= rowvar~. create trellis graphs based on a single conditioning variable
= .~colvar create trellis graphs based on a single conditioning variable
=
fill=
formula= formula=y~x add simple linear regression lines
= formula=y~poly(x,2) produce a quadratic fit
=
=
geom= Specifies the geometric objects that define the graph type. The geom option is expressed as a character vector with one or more entries.
geom="point"
geom="smooth"
geom="boxplot"
geom="line"
geom="histogram"
geom="density"
geom="bar"
geom="jitter"
main= Character vectors specifying the title
method= If geom="smooth", a loess fit line and confidence limits are added by default. When the number of observations is greater than 1,000, a more efficient smoothing algorithm is employed. Methods include "lm" for regression, "gam" for generalized additive models, and "rlm" for robust regression. The formula parameter gives the form of the fit.
method="lm" add simple linear regression lines
method="rml" load the mgcv package
method="gam" load the MASS package
shape=
size=
sub= Character vectors specifying the subtitle
x= Specifies the variables placed on the horizontal axis. For univariate plots (for example, histograms), omit y
y= Specifies the variables placed on the vertical axis. For univariate plots (for example, histograms), omit y
xlab= Character vectors specifying horizontal axis labels
xlim= Two-element numeric vectors giving the minimum and maximum values for the horizontal axes, respectively
ylab= Character vectors specifying vertical axis labels
ylim= Two-element numeric vectors giving the minimum and maximum values for the vertical axes, respectively

Reference:

*Graphics with ggplot2

results matching ""

    No results matching ""