N <- 300
N.2 <- 800
N.3 <- 600
change.y <- c(N, N.2, N.3)
use.y <- which.max(change.y)
graph.ylim <- use.y + 100
The output is [2], which is correct technically, but I want the output to say 800, not 2. Then, I want to plug in use.y
as the y-lim
here:
coord_cartesian(xlim = c(0:300), ylim = c(150:900)) +
...
Does anyone know how to do this? When I plug in ylim = c(150:graph.ylim))
, my graph disappears.
> change.y
[1] 300 800 600
> use.y <- max(change.y)
> use.y
[1] 800
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.