我一直在pairs()
为此工作,并且花了很长时间试图添加图例或使用幻象符号来改变标题中物种的颜色以与点相关......任何见解将不胜感激!这是个问题。
# original code
pairs(iris[1:4],
main = "Width and Length (cm) of Iris's Petals and Sepals: Setosa, Veriscolor, Virginica",
pch = 24, bg = c("mediumorchid4", "mediumpurple1", "lightpink1")[unclass(iris$Species)],
upper.panel=NULL, labels=c("Sepal Length","Sepal Width","Petal Length","Petal Width"),
font.labels=1, cex.labels=2)