[S] Rotating text in the outer margin of Splus graphs

Patrick K. Lampani (m1kpl00@Frb.GOV)
Mon, 13 Apr 1998 11:10:01 -0400


This is a multi-part message in MIME format.

--------------4A72798144D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

I haven't been able to figure out how to rotate text in the outer margin
of a figure that has four separate plots in it. The orientation of the
output figure is landscape and I eventually import the postscript file
into a LaTex file. I am using Splus Version 3.4 Release 1 for Sun SPARC,
SunOS 5.3

Here's is a description of the problem. I need to rotate the text of
the y-axis 180 degrees so that it has the same orienatation as normal
text in a LaTex document. I have used every combination of 'srt',
'crt', 'adj', and 'at' commands.

I understand that I am supposed to use the 'at' command with the 'srt'
command, but in a multiple plot figure, what is the scale for the 'at'
command? Do anyone have any clues?

Thanks in advance.

-Patrick

P.S. Attached is a sample file. I am trying to rotate the test Corn
Yield 180 degrees.

-- 
_______________________________________________________
K. Patrick Lampani              email: plampani@frb.gov  
Federal Reserve Board           work : 202-452-2653      
Financial Structure/Stop 149    fax  : 202-728-5838      
Washington, DC 20551-0001                             
-------------------------------------------------------

--------------4A72798144D Content-Type: text/plain; charset=us-ascii; name="test.s" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.s"

graphics.off()

xx <- cbind(corn.rain,corn.yield) x <- xx[sort.list(xx[,1]),1] y <- xx[sort.list(xx[,1]),2]

yrange<-c(min(y),max(y)) xrange<-c(min(x),max(x))

unix("rm ./test.eps") postscript("./test.eps", horizontal=T,onefile=F,print.it=F) par(mex=2, oma=c(0,1,1,0),mfrow=c(2,2))

# First Plot plot(x,y, type="l", ylim=yrange, lty=1, ylab="", xlab="" , bty="l", las=1, mgp=c(1,1,0) ) mtext("(a) First Plot",side=3,line=1) par(xaxs="r",yaxs="r") # Second Plot plot(x,y, type="l", ylim=yrange, lty=1, ylab="", xlab="" , bty="l", las=1, mgp=c(1,1,0) ) mtext("(b) Second Plot",side=3,line=1) par(xaxs="r",yaxs="r") # Third Plot plot(x,y, type="l", ylim=yrange, lty=1, ylab="", xlab="" , bty="l", las=1, mgp=c(1,1,0) ) mtext("(c) Third Plot",side=3,line=1) par(xaxs="r",yaxs="r") # Fourth Plot plot(x,y, type="l", ylim=yrange, lty=1, ylab="", xlab="" , bty="l", las=1, mgp=c(1,1,0) ) mtext("(d) Fourth Plot",side=3,line=1) par(xaxs="r",yaxs="r") mtext("Corn Yield", side=2,line=0,outer=T,cex=1.2) mtext("Annual Rainfall", side=1,line=-1,outer=T,cex=1.2) mtext("Figure 1. Relationship of Corn Yield to Annual Rainfall.",side=3,line=1,outer=T,cex=1.5) mtext("1890-1927",side=3,line=0,outer=T,cex=1.25)

dev.off()

--------------4A72798144D--

----------------------------------------------------------------------- This message was distributed by s-news@wubios.wustl.edu. To unsubscribe send e-mail to s-news-request@wubios.wustl.edu with the BODY of the message: unsubscribe s-news