lmplot | R Documentation |
Simple function to plot and name a linear model
lmplot(
x,
y,
xname = "X variable",
yname = "Y variable",
pngtype = c("cairo-png", "quartz", "Xlib"),
xlab = xname,
ylab = yname,
plotname = xname,
r2line = TRUE,
pointtext = FALSE,
pointlabs = x,
pointcol = "black",
savedir = "",
...
)
x |
Explanatory variable data. |
y |
Response variable data. |
xname |
Variable name for plot header. |
yname |
Variable name for plot header. |
pngtype |
Filetype for png files, alternatively try "quartz" on Mac. |
xlab |
X axis label, parsed from xname unless specified. |
ylab |
Y axis label, parsed from yname unless specified. |
plotname |
Filename for png, parsed from xname unless specified. |
r2line |
Plot rsquared trendline, default TRUE. |
pointtext |
Label each point? Default FALSE. |
pointlabs |
Point labels, defaults to resvar value. |
pointcol |
Points colour, default "black". |
savedir |
Save location, end with "/". |
... |
Allows controlling of text label params e.g. adj cex &. |
Errors and their origins:
Invisibly saves png plot into savedir.
Simon Dedman, simondedman@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.