我想改变等高线图的默认彩色图,但我不知道如何改变。
这是我使用的代码。
library(rsm)
A <- c(-1,+1,-1,+1,-1,+1,-1,+1)
B <- c(-1,-1,+1,+1,-1,-1,+1,+1)
y <- c(26,34,21,29,27,33,20,30)
model <-lm(y ~ A+B)
summary(model)
contour(model, ~A+B, image = TRUE)
等高线图生成了下面的图片 The contour plot generates the image below. 我想把颜色图改成一个对色盲友好的颜色图,就像viridis一样。
先谢谢你的帮助。