[R] Rotate values on Y axis

d d sutcliffe@durham ac uk d.d.sutcliffe at durham.ac.uk
Fri Jun 9 15:13:29 CEST 2006


Hi,

I have been working through one of the examples on the FAQ about 
rotating  the labels on the x axis, I need to do the same but for the y 
axis. I have managed to change some of the code, but I am still not 
getting there, there is still something wrong. My syntax is as follows:


 > par(mar = c(5, 7, 4, 2) + 0.1)
 > plot(1 : 8, yaxt = "n",  ylab = "")
 > axis(2, labels = FALSE)
 > labels <- paste("Label", 1:8, sep = " ")
 > text(1:8, par("usr")[3] - 0.25, srt = 45, adj = 1,
+  labels = labels, xpd = TRUE)

If anybody knows what is wrong then I would appreciate your help...been 
working on this for far too long already!

Regards,

Dan



More information about the R-help mailing list