画一个形成的情节?

时间:2016-08-10 16:42:32

标签: r plot

enter image description here我有一张表如下。我想有一个图表,我可以显示位于起点和终点之间的点列。例如,我喜欢在图中用线显示点列。

RectTransform.anchoredPosition3D

1 个答案:

答案 0 :(得分:0)

这是你在找什么?

library(ggplot2)
library(reshape2)

df <- data.frame(point = c(10,20,30,40,50), start = c(20,30,40,50,60), end = c(30,40,50,60,70))
df.long <- melt(df, id = "point", measure = c("start","end"))
pl <- ggplot(data = df.long, aes(x = point, y = value, group = point)) + geom_line()
pl