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