Skip to content

Reorder the x-axis using lattice

1 message · Richard Cotton

#
When the x-axis is a factor, bwplot plots in order of the factor levels. 
You'll need to explicitly set the levels in your data frame:

Skalor <- factor(c("BP", "GH", "MH", "PF", "RE", "RP", "SF", "VT", "BP", 
"GH", "MH", "PF", "RE", "RP", "SF", "VT"), levels=c("PF", "RP", "BP", 
"GH", "VT", "SF", "RE", "MH"))
kt <- data.frame(Kon=Kon, Skalor=Skalor, ...)
bwplot(...) #as before

Regards,
Richie.

Mathematical Sciences Unit
HSL


r-help-bounces at r-project.org wrote on 31/03/2008 11:05:18:
http://www.R-project.org/posting-guide.html
------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:21}}