Adjust number of ticks in R levelplot -
i have following r code:
library(lattice) x <- rep(seq(6,15,by=1), each=20) y <- rep(seq(0,0.95,by=0.05), 10) z <- x*y levelplot(z ~ x * y)
it produces plot:
how can have ticks @ 6, 7, ..., 15 on x-axis , ticks @ 0.0, 0.1, ..., 0.9 on y-axis?
library(lattice) x <- rep(seq(6,15,by=1), each=20) y <- rep(seq(0,0.95,by=0.05), 10) z <- x*y x.scale <- list(at=seq(6,15,1)) y.scale <- list(at=seq(0,0.9,0.1)) levelplot(z ~ x * y, scales=list(x=x.scale, y=y.scale))
Comments
Post a Comment