我对R有点新,我试图从真实数据中绘制值。 x轴是时间和y轴的实际值,但在图表y轴中介于0和100之间,但y的实际值不同。
我需要你的帮助。谢谢你
答案 0 :(得分:0)
y <- c(9.21368, 8.90582, 8.92218, 8.53934, 7.99324, 7.53952, 7.51255, 7.1065, 6.91431,
6.9704, 7.92692, 7.74947, 7.10618, 6.50479, 5.9741, 5.08136, 4.32405, 3.86809,
3.4377, 3.54596, 3.07406, 2.92242, 1.67285, 1.11221, 0.501673)
t <- 1 : length(y)
plot(t, y)
# Length(y) and length(t) must be same.
答案 1 :(得分:0)
y轴总是像x轴一样,但实际上不是那样:
答案 2 :(得分:0)
You can view your y-axis values in the plot, by adding text function
y <- c(9.21368, 8.90582, 8.92218, 8.53934, 7.99324, 7.53952, 7.51255, 7.1065, 6.91431,
6.9704, 7.92692, 7.74947, 7.10618, 6.50479, 5.9741, 5.08136, 4.32405, 3.86809,
3.4377, 3.54596, 3.07406, 2.92242, 1.67285, 1.11221, 0.501673)
t <- 1: length(y)
plot(t,y)
text(t,y,pos=3, cex=0.7)