Skip to content
Prev 366654 / 398502 Next

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

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:
Message-ID: <CA+8X3fW5Q7Wokci5OB1mUFjwKNF0Okp_mGX90cH4akqcma5AAg@mail.gmail.com>
In-Reply-To: <SY3PR01MB2074150EFF82792ABDB1B065A97F0@SY3PR01MB2074.ausprd01.prod.outlook.com>