inst/examples/iris-ggplot2.R

data("iris")
library(ggplot2)
p = ggplot(aes(x = Petal.Length, y = Petal.Width), data = iris) +
  geom_point(aes(color = Species, shape = Species)) +
  labs(x = "花瓣长度", y = "花瓣宽度", color = "种类", shape = "种类")
print(p)
yihui/MSG documentation built on Aug. 16, 2021, 12:13 p.m.