我试图将多个y值绘制为单个x值(日期)的点。每个时间点都有可变数量的y值。它与在同一图表上绘制多条线不同,因为时间t处的点与时间t + 1处的点之间的关系是未知的。我也不想要一个箱形图。我想清楚地看到每一点。当我尝试绘制这个时,R想要重组x轴,把我的时间序列扔掉。有人可以帮忙吗?
伊恩
windows()
plot(mu ~ date, xlab="Date", ylab="Mean Length (um)")
axis(1, date, format(date, "%b %d"))
site date mu
eldo pipe 9/3/2012 89.1365072
eldo pipe 9/3/2012 125.235052
eldo pipe 9/3/2012 135.153096
eldo pipe 9/3/2012 113.847438
eldo pipe 9/3/2012 89.732397
eldo pipe 9/3/2012 111.071991
eldo pipe 9/3/2012 122.437213
eldo pipe 9/3/2012 134.821803
eldo pipe 9/3/2012 110.687526
eldo pipe 9/3/2012 100.9783758
eldo pipe 9/3/2012 131.321202
eldo pipe 9/3/2012 123.56519
eldo pipe 9/3/2012 136.517857
eldo pipe 9/26/2012 96.0162055
eldo pipe 9/26/2012 102.1533248
eldo pipe 9/26/2012 119.846013
eldo pipe 9/26/2012 130.1969079
eldo pipe 9/26/2012 135.3865
eldo pipe 9/26/2012 140.3697581
eldo pipe 9/26/2012 108.4733771
eldo pipe 9/26/2012 122.834203
eldo pipe 9/26/2012 137.80903
eldo pipe 9/26/2012 120.292561
eldo pipe 9/26/2012 133.746842
eldo pipe 11/2/2012 106.26084
eldo pipe 11/2/2012 125.249647
eldo pipe 11/2/2012 129.028305
eldo pipe 11/2/2012 137.932549
eldo pipe 11/2/2012 147.8790966
eldo pipe 11/2/2012 116.63048
eldo pipe 11/2/2012 121.930454
eldo pipe 11/2/2012 86.85304
eldo pipe 11/2/2012 130.63338
eldo pipe 11/2/2012 146.3816077
eldo pipe 11/2/2012 84.58692
eldo pipe 11/2/2012 103.925925
eldo pipe 11/2/2012 111.2692061
eldo pipe 11/2/2012 120.093059
eldo pipe 11/2/2012 131.782033
答案 0 :(得分:3)
您可以使用抖动的stripchart
来查看每次的所有积分。
> par(mar = c(5, 5, 4, 2))
> stripchart(mu ~ date, data = dat, method = "jitter", pch = 1, las = 1)