2

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!

markus
  • 25,843
  • 5
  • 39
  • 58

1 Answers1

3

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

LyzandeR
  • 37,047
  • 12
  • 77
  • 87