Hello, I recently switch over from Splus to R and I have not been able to generate right axis labels that face inwards. This is accomplished in Splus with the command srt=270 but this option is not supported in R. In addition the par argument las=0 or 3 does not rotate the right axis labels. The editor of a journal is demanding that the right axis labels face inwards in the figures I recently submitted. I am really at a loss because these editors are inflexible with respect to their in-house journal styles. Help?! Chris ------------------------------------------------------------ Chris Jeffery (cjeff at geog.ubc.ca) Department of Geography, Tel: (604) 822-2663 University of British Columbia, B.C. Fax: (604) 822-6150 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi> I recently switch over from Splus to R and I have not been able to > generate right axis labels that face inwards. This is accomplished > in Splus with the command srt=270 but this option is not supported > in R. In addition the par argument las=0 or 3 does not rotate the > right axis labels.Unfortunately, R's axis() and mtext() functions only listen to par(las) to determine text rotation (i.e., they ignore par(srt)) and they only choose between srt=0 and srt=90. This is actually documented behaviour (see help(par)), but I doubt that is much help to you :)> The editor of a journal is demanding that the right axis labels face > inwards in the figures I recently submitted. I am really at a loss > because these editors are inflexible with respect to their in-house > journal styles.This is not pretty, but if I have understood correctly it should do what you want ... par(xpd=T) # so that text() will draw outside of the plotting region plot(1:10) # replace this with your plotting commands axis(4, labels=F) # draw axis ticks but no labels text(rep(11, 5), seq(2,10,2), seq(2,10,2), srt=270) # draw tick labels by hand ... where I have used `rep(11, 5)` for the x-locations of the labels, you will need to experiment to get the placing right. You will also need to replace the `seq(2,10,2)` bits with appropriate y-locations too. The problem with the x-locations is that this is trying to locate the text within the plot margins by specifying x-locations in terms of the user coordinate system. As I said, it is not pretty :) Paul -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Chris Jeffery <cjeff at geog.ubc.ca> writes:> Hello, > > I recently switch over from Splus to R and I have not been able to > generate right axis labels that face inwards. This is accomplished > in Splus with the command srt=270 but this option is not supported > in R. In addition the par argument las=0 or 3 does not rotate the > right axis labels. > > The editor of a journal is demanding that the right axis labels face > inwards in the figures I recently submitted. I am really at a loss > because these editors are inflexible with respect to their in-house > journal styles. > > Help?!Hmm. I can't come up with anything offhand. In contrast to axis() and mtext(), text() will happily use srt=, but it's going to be painful to add the axis labels at the right spots. If you're on something Unix/Linux like, perhaps the xfig() driver could help? -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._