解决:geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic?
目录
#仿真数据
library(ggplot2)
data <- data.frame(x = LETTERS[1:5],
# Example data
y = c(3, 1, 6, 3, 5))
data
#
ggplot(data, aes(x, y)) +
# Trying to draw line plot
geom_point() +
geom_line()
> ggplot(data, aes(x, y)) +
+ # Trying to draw line plot