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)

Try the MSG package in your browser

Any scripts or data that you put into this service are public.

MSG documentation built on July 22, 2021, 1:06 a.m.