Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 202041

How do I set the regression line color in the r car scatterplotMatrix function

$
0
0

How do I change the color of the regression line in the r car scatterplotMatrix function?

If I run this code:

# Load the iris dataset.
library(car)
data(iris)

# Plot #1: Basic scatterplot matrix of the four measurements
scatterplotMatrix(~Sepal.Length+Sepal.Width+Petal.Length+Petal.Width, data=iris)

then I get this plot: enter image description here

Inspection shows the points, the smooth windows, and the regression lines are all the same color and are not all very clearly differentiated.

If I wanted the points in blue, the regression in green, and the smooth in orange, how would I do that?


Viewing all articles
Browse latest Browse all 202041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>