[R] Setting scales for ggplot2 with facets
Sven Laur
swen at math.ut.ee
Sat Sep 11 22:21:25 CEST 2010
Faceting in ggplot2 seems to permit different scales for different
facets, but I fail
to see how one could control ylim and xlim ranges for each facet
separately.
For instance, I would like to set the ylim = c(0,10) for facet "A"
and ylim = c(42,102) for facet "B". Since the data is out of these
ranges,
setting facet_grid(factor ~ ., scales = "free_y") does not achieve the
goal .
Is there a decent way to achieve this or not? or I have to drop data
points
outside y-ranges as a quick hack?
Swen Laur
More information about the R-help
mailing list