0
,我有以下数据:GGPLOT2:添加额外的指南菱形ppints
groups = c(rep(1,5),rep(2,5),rep(3,5))
scores = c(seq(1,5),seq(1,5),seq(1,5))
times1 = rnorm(15, mean = 3 , sd = 2)
times2 = rnorm(15, mean = 1 , sd = 0.5)
df = data.frame(groups,scores, times1,times2)
,我有以下情节
df = data.frame(groups,scores, times1,times2)
plt = ggplot(df, aes(x = scores, y = times1, color = factor(groups)))
plt = plt + geom_point(cex = 4) + geom_line() + theme_bw()
plt = plt + geom_point(aes(x = scores, y=times2),pch = 23, cex =4)+ geom_line(aes(x = scores, y=times2))
plt = plt + facet_wrap(~ groups, ncol = 4, scales = "free_x")
plt
导致
如何添加钻石点的指南,以及如何更改钻石点e的每个相应的指南。
,才有可能从组指南中删除界的格式并保持颜色和线条? – kolonel
只需放下geom_point()参数 - 注意ggplot将不同的绘图元素层叠在一起 - geom_line提供线条,geom_point点(形状) - 都从基础层美学继承它们的着色 – CMichael
@CMichael我熟悉你在说什么,但我不能因为我仍然需要点的指导而放弃geom_point。 – kolonel