[R] rotated ylab with xyplot

2005-11-28 Thread Viet Nguyen
hi all,

in R, what's the best way to have a rotated ylab in a graph plotted with 
either xyplot or xYplot?  I tried this but it didn't work.

xyplot(y~x,data.frame(x=1:10,y=runif(10)),ylab=list(srt=90,crt=90,rot=90,label=my
 label))


more generally, how do you output a text at an angle in a lattice graph?

what would be a good reference for R lattice graphics?  I need more help 
than the help pages provide.

thank you in advance.

vn

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] rotated ylab with xyplot

2005-11-28 Thread Austin, Matt
Try

library(grid)
xyplot(y~x,data.frame(x=1:10,y=runif(10)), ylab=textGrob(label=my label,
rot=0))

Note in the ?xyplot the xlab/ylab section points to the 'main' parameter
where it defines that a list can be used, however string rotation parameters
are not in the list.  The helpfile notes that a grob object can be used.

The reference for lattice and grid is R Graphics by Paul Murrell.

--Matt

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Viet Nguyen
 Sent: Monday, November 28, 2005 8:33 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] rotated ylab with xyplot
 
 
 hi all,
 
 in R, what's the best way to have a rotated ylab in a graph 
 plotted with 
 either xyplot or xYplot?  I tried this but it didn't work.
 
 xyplot(y~x,data.frame(x=1:10,y=runif(10)),ylab=list(srt=90,crt
 =90,rot=90,label=my label))
 
 
 more generally, how do you output a text at an angle in a 
 lattice graph?
 
 what would be a good reference for R lattice graphics?  I 
 need more help 
 than the help pages provide.
 
 thank you in advance.
 
 vn
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html