pratikunterwegs
pratikunterwegs

Reputation: 73

Changing visreg line colour

I'm using the R package visreg to visualise the results of a model. I want to change the colour of the regression line from the default blue to black. Adding col = "black" doesn't help. How do I make this change?

Thanks!

Upvotes: 2

Views: 1856

Answers (1)

LyzandeR
LyzandeR

Reputation: 37889

You need to pass col = black in the line.par argument:

fit <- lm(Ozone ~ Solar.R + Wind + Temp,data=airquality)
visreg(fit, line.par = list(col = 'black'))

enter image description here

Upvotes: 3

Related Questions