Description Usage Arguments Value Author(s)
Function to generate a simple scatter plot
1 2 3 |
data |
A dataframe with at least three columns (x,y and a facetting variable) (Required) |
by |
Grouping variable (Default: NULL) |
fun |
Function for statistical aggregation function (Default: "mean") |
smooth.fun |
Smoothing method (function) to use, eg. "lm", "glm", "gam", "loess", "rlm". (Default: "auto") For method = "auto" the smoothing method is chosen based on the size of the largest group (across all panels). loess is used for less than 1,000 observations; otherwise gam is used with formula = y ~ s(x, bs = "cs"). Somewhat anecdotally, loess gives a better appearance, but is O(n^2) in memory, so does not work for larger datasets. |
smooth.formula |
Formula to use in smoothing function, eg. y ~ x, y ~ poly(x, 2), y ~ log(x) (Default: y ~ x) |
density |
Display density contour (Default: FALSE) |
title |
Plot Title (Default: NULL) |
xlab |
x-axis label (Default: NULL) |
ylab |
y-axis label (Default: NULL) |
legend.pos |
(Default: "none") |
ggplot2 figure
Jens Hooge
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.