Re: [R] axis labels vertically

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Fri 17 Jun 2005 - 20:30:34 EST

BoM DS wrote:
> Hi,
>
> I have a plot and a custom axis labeling, e.g.
>
> x<-c(...)
> plot(x,axes=FALSE)
> axis(2)
> axis(1,1:50,c("label1",...,"label50"))
>
> now since the labels are quite long, only a few fit on the page.
> Can I rotate each label by 90 degree counterclockwise
> (so that they are vertical)

You should (re-)read ?axis, which points you to the "las" parameter:

x <- 1:50

plot(x, axes = FALSE)
axis(1, x, paste("label", x), las = 2, cex.axis = 0.5)
axis(2)

box()

--sundar



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 Received on Fri Jun 17 21:03:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:46 EST