Veerappa Chetty wrote:
> 
> Hi,Can I use "reorder" function with barchart as in dotchart? Here are
> some
> codes which do not work for  me.
> .. example remove
> 

As your example is not self-contained (it should be), I cannot show it with
your data.
My preferred way is to reorder outside, because it enforces consistency when
I do several plots.

Dieter

library(lattice)
barchart(yield ~ variety | site, data = barley,
         groups = year, layout = c(1,6),
         ylab = "Barley Yield (bushels/acre)",
         scales = list(x = list(abbreviate = TRUE,
                       minlength = 5)))
                       
levels(barley$site) = c( "Waseca","Grand Rapids","Duluth","University
Farm","Morris" ,
  "Crookston"  )
  
barchart(yield ~ variety | site, data = barley,
         groups = year, layout = c(1,6),
         ylab = "Barley Yield (bushels/acre)",
         scales = list(x = list(abbreviate = TRUE,
                       minlength = 5)))
                       

-- 
View this message in context: 
http://www.nabble.com/Lattice-barchart-reordered-tp25865201p25867980.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to