[R] ggplot2 axis scales
mazatlanmexico at yahoo.com
Sat Jun 28 22:22:25 CEST 2008
Was this question ever answered?
#Is it possible to have different axis limit for each facet in a ggplot2 plot? Here is an example
qplot( x, value, data=dat, facets=variable~., geom="line" ) + scale_y_continuous(limits=c(NA,NA))
#Both the x and y axes are now the same for both facets. But since the ranges of the 'y'
# and the 'z' variable differ so much, I would prefer their y axes to be different. This is easy to do in 'lattice':
xyplot( value~x | variable, data=dat, type="l", layout=c(1,2), scale=list(y="free") )
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
More information about the R-help