Skip to content

Adding regression line to each individual plot in a window with multiple plots

1 message · Jim Lemon

#
Hi Jake,
In the second line of your script, you set xpd=NA. That means that
abline will draw a line across the entire display region rather than
restricting it to the plot region. If you must set this at the
beginning, then add these lines:

par(xpd=TRUE)
abline(lm(...))
par(xpd=NA)

for each regression line you display.

Jim


On Wed, Jan 18, 2017 at 1:41 PM, Jake William Andrae
<jake.andrae at adelaide.edu.au> wrote: