I think we'll need a reproducible example from you because the
following example from the ggplot2 book (p. 124) seems to work for me:
mpg2 <- subset(mpg, cyl != 5 & drv %in% c('4', 'f'))
mpg3 <- within(mpg2, {
model <- reorder(model, cty)
manufacturer <- reorder(manufacturer, -cty)
} )
qplot(cty, model, data = mpg3)
qplot(cty, model, data = mpg3) + coord_flip() +
opts(axis.text.x = theme_text(angle = 90))
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] plyr_1.7.1 reshape2_1.2.1 scales_0.2.1 deldir_0.0-19 MSG_0.2
[6] proto_0.3-9.2 ggplot2_0.9.1
loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 labeling_0.1
[5] MASS_7.3-18 memoise_0.1 munsell_0.3 RColorBrewer_1.0-5
[9] stringr_0.6 tools_2.15.0
Dennis