How to hide x-axis in lattice R -
how hide x-axis (xlim?) in lattice xyplot?
normally plot be:
hist(rnorm(10,0,2), axes=f)
and global solution great, since have quite few plots. i'm using gridextra package:
grid.arrange(plot1,plot2,plot3, ncol=3)
this instance allows hide xlab, ylab, main.
pl = list(plot1,plot2,plot3) do.call(grid.arrange, lapply(pl, update, xlab="", ylab="", main=""))
sample data in case:
data <- data.frame(x=rnorm(10,2,2),y=rnorm(10,3,3),z=rexp(10,2)) plot1 <- xyplot(x~y, data, xlab="name", ylab="name", main="title") plot2 <- xyplot(z~y, data, xlab="name", ylab="name", main="title") plot3 <- xyplot(z~x, data, xlab="name", ylab="name", main="title")
hiding globally can shown on print()
on above or else helps.
try this
xyplot(1:10~1:10, scales=list(x=list(at=null)))
you should read docs in ?xyplot
Comments
Post a Comment