This grob adds a smoother to the graphic to aid the eye in seeing important patterns, especially when there is a lot of overplotting.
the plot object to modify
named list of aesthetic mappings, see details for more information
other options, see details for more information
data source, if not specified the plot default will be used
You can customise this very freely, firstly by choosing the function used
to fit the smoother (eg.
glm) and the formula used to related the y and x
y ~ x,
y ~ poly(x,3)).
This smoother is automatically restricted to the range of the data. If you want to perform predictions (or fit more complicated variabels with covariates) then you should fit the model and plot the predicted results.
Aesthetic mappings that this grob function understands:
x:x position (required)
y:y position (required)
size:size of the point, in mm (see
colour:point colour (see
weight: observation weights
These can be specified in the plot defaults (see
aesthetics argument. If you want to modify the position
of the points or any axis options, you will need to add a position scale to
the plot. These functions start with
method:smoothing method (function) to use
formula:formula to use in smoothing function
se:display one standard error on either side of fit? (true by default)
other arguments are passed to smoothing function
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.