[R] dotplot, dropping unused levels of 'y'
sundar.dorai-raj at pdf.com
Fri Sep 15 21:45:42 CEST 2006
Benjamin Tyner said the following on 9/15/2006 2:36 PM:
> In dotplot, what's the best way to suppress the unused levels of 'y' on
> a per-panel basis? This is useful for the case that 'y' is a factor
> taking perhaps thousands of levels, but for a given panel, only a
> handfull of these levels ever present.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Use scales(x = list(relation = "free")) in your call to dotplot:
z <- data.frame(x = rep(LETTERS[1:20], each = 4),
y = 1:80, g = gl(4, 20))
dotplot(y ~ x | g, z,
scales = list(x = list(relation = "free")))
More information about the R-help