[R] Lattice Package...

Deepayan Sarkar deepayansarkar at yahoo.com
Fri Apr 12 18:34:30 CEST 2002


--- Shawn Way <sway at tanox.com> wrote:
> 
> I have two questions:
> 
> 2. The real question...  Is it possible to change the barchart horizontal
> bars on lattice to give vertical bars?  If so, could you please give me a
> hint on how to do so?

This should be doable in the development version of Lattice. There is an 
example in example(xyplot), and it's exactly as you would expect (I hope);
i.e, you would get  vertical bars if you do 

barchart(y~x)

where x is a factor/shingle/character vector and y is numeric. 
If you really want this when x is numeric, you have to additionally give

barchart(y~x, horizontal = FALSE)

One issue is how to write the levels of x on the x-axis. If the labels are 
long, I would suggest either 

scales = list(x=list(rot = 90))

or

scales = list(x=list(abbreviate = TRUE))


-Deepayan


__________________________________________________



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list