我正在使用鸢尾花数据,之前将物种因子从“setosa”、“versicolor”和“virginica”更改为“s”、“c”和“v”。 如果我对此进行编码: plot(iris$Sepal.Length, iris$Petal.Length, col = iris$Species)
数据是可以更改为例如正方形的点: plot(iris$Sepal.Length, iris$Petal.Length, col = iris$Species, pch = 15)
但是,我怎么能像这个图一样显示物种因子?