On 10/23/06, Alex Brown <[EMAIL PROTECTED]> wrote: > Hi Geoffrey, > > I replicated your problem, and I came up with the same solution as > Deepayan, so I won't reprint it here but: > > Can anyone explain why the key is inverted versus the bar order?
Because the key goes from top to bottom, while cartesian coordinates go from bottom to top. Neither can really be any other way by default, if you think about it. I did promise someone that I would add an option to reverse the order in key, but looks like I haven't done that yet. > I'd also like to thank you for showing me a different approach to > lattice formulae. I would have used the following formulation: > > ex2 = stack(example) > ex3 = cbind(country=rep(rownames(example),2),ex2) > barchart(country ~ values, ex3,group=ind, auto.key=TRUE) Since we are talking about alternatives, here's another: barchart(as.matrix(example), stack = FALSE, auto.key = TRUE) -Deepayan > > -Alex Brown ______________________________________________ [email protected] 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.
