stats::lm
and stats::glm
Autoplot stats::lm
and stats::glm
# S3 method for lm
autoplot(
object,
which = c(1:3, 5),
data = NULL,
colour = "#444444",
size = NULL,
linetype = NULL,
alpha = NULL,
fill = NULL,
shape = NULL,
label = TRUE,
label.label = ".label",
label.colour = "#000000",
label.alpha = NULL,
label.size = NULL,
label.angle = NULL,
label.family = NULL,
label.fontface = NULL,
label.lineheight = NULL,
label.hjust = NULL,
label.vjust = NULL,
label.repel = FALSE,
label.n = 3,
smooth.colour = "#0000FF",
smooth.linetype = "solid",
ad.colour = "#888888",
ad.linetype = "dashed",
ad.size = 0.2,
nrow = NULL,
ncol = NULL,
...
)
ggplot
stats::lm
instance
If a subset of the plots is required, specify a subset of the numbers 1:6.
original dataset, if needed
line colour
point size
line type
alpha
fill colour
point shape
Logical value whether to display labels
Column name used for label text
Colour for text labels
Alpha for text labels
Size for text labels
Angle for text labels
Font family for text labels
Fontface for text labels
Lineheight for text labels
Horizontal adjustment for text labels
Vertical adjustment for text labels
Logical flag indicating whether to use ggrepel
, enabling this may take some time for plotting
Number of points to be laeled in each plot, starting with the most extreme
Line colour for smoother lines
Line type for smoother lines
Line colour for additional lines
Line type for additional lines
Fill colour for additional lines
Number of facet/subplot rows
Number of facet/subplot columns
other arguments passed to methods
if (FALSE) {
autoplot(lm(Petal.Width ~ Petal.Length, data = iris))
autoplot(glm(Petal.Width ~ Petal.Length, data = iris), which = 1:6)
autoplot(lm(Petal.Width~Petal.Length, data = iris), data = iris, colour = 'Species')
}
Run the code above in your browser using DataLab