Bobo
Bobo

Reputation: 971

how do I remove regression line from scatterplotMatrix?

I'm trying to remove the regression lines from scatterplotMatrix. I've tried this but that does not work

library(car)
scatterplot.matrix(~mpg+disp+drat+wt|cyl, data=mtcars,
   main="Three Cylinder Options", reg.line=F, lwd=0)

Upvotes: 0

Views: 982

Answers (1)

Roman Luštrik
Roman Luštrik

Reputation: 70643

If you look at the documentation of scatterplotMatrix, you will notice argument smoother. Set it to NULL.

scatterplot.matrix(~mpg+disp+drat+wt|cyl, data=mtcars,
   main="Three Cylinder Options", reg.line=F, lwd=0, smoother = NULL)

Upvotes: 1

Related Questions