I have a data set like the following one:
data<-data.frame(x=c(50,100,250,400),y1=c(0.74,0.75,0.82,0.79),y2=c(0.81,0.83,0.87,0.88))
I generate the plot like this:
plot(data$x,data$y1,type='l',col="red",xaxs='i',yaxs='i',ylim=c(0.4,1),xlim=c(50,500))
lines(data$x, data$y2, type='l',col="blue")
The generated figure is:
How could I make the following modifications on this plot?
1) The current X axis starts with 50. But it does not mark 50 explicitly.
2) The current X axis is marked as
100, 200, 300, 400, 500
, Can I mark it as50,100, 250,500
?3) The current Y axis is marked as
0.5, 0.6,0.7.0.8,0.9,1.0
. Can I mark it as0.5, 0.55, 0.6, 0.65, 0.7,0.75, 0.8, 0.85, 0.9, 0.95, 1
?4) I would like to add some grid line parallel to X axis. These lines should start at points of
0.5, 0.55, 0.6, 0.65, 0.7,0.75, 0.8, 0.85, 0.9, 0.95, 1
along the Y-axis.