I am somewhat new to R and I am trying to plot values from real data . x axis is the time and y axis real values but in graph y axis is between 0 and 100, but the real values of y are different.
I need your help.Thank you
I am somewhat new to R and I am trying to plot values from real data . x axis is the time and y axis real values but in graph y axis is between 0 and 100, but the real values of y are different.
I need your help.Thank you
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.
The y-axis is always like the x axis but in reality is not like that:
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)