I need to plot multiple plots of the same two variables but the range of y values differs across plots. To simplify the y axes, I would like each plot to show only show a tick mark and label at the min and max range on the y axis (min/max of the plot, not the data).
I've played around with the usr and yaxp parameters but no luck. Here's a toy example:
x<-1:10
y<-3:12
plot(x,y,yaxp=c(par("usr")[3],par("usr")[4],1))
I am expecting tick marks/labels corresponding to the top and bottom of the plot along the y axis (with none in-between) but this doesn't end up putting any tick marks or labels on the y axis. Can anyone explain why and how to return the desired outcome?
Thanks!