s-news
[Top] [All Lists]

S-plus Users:

To: <s-news@lists.biostat.wustl.edu>
Subject: S-plus Users:
From: "Lewis Jordan" <lcj6444@warnell.uga.edu>
Date: Wed, 29 Nov 2006 13:02:56 -0500
S-plus Users:
 
I am currently trying to create some conditioning plots using xyplot. I want to plot y*n for two distinct "regions" and then overlay the levels of a second factor "m" onto the plots for each region. For the example below, I will have 1 column and 2 rows with each row corresponding to a "region". I then overlay the values of y for the second factor "m" onto each plot for the respective "region". A legend is created at the top of the graph listing the linetype (lty) for each level of "m".
 
THE PROBLEM: When I copy the graph in s-plus and paste it directly into Microsoft word, the legend identifying the line types become almost transparent, so when I print it out you can hardly identify which line type corresponds to the level of "m". The lty's in the graph look great, so no problem there. I have also tried exporting the graph as a .jpeg, bmp and the same thing occurs.
 
THE SOLUTION: How can I make the lty's in the legend more identifiable? I cannot increase the line width (lwd) b/c the values between the levels of "m" are so small that you could not distinguish between the levels.
This is not the case for the example below b/c I only have 2 levels of "m", but for the entire data set I have 6 levels and it just looks like a great big mess if I increase the LWD.
 
Any suggestions as to how I can remedy this problem? Is there perhaps an easier way to get the graph that I am interested in?
 
Thanks for the help...
 
Lewis Jordan 
 
"Plots"<-
structure(list(n=c(20,  40,  60,  80, 100,  20,  40,  60,  80, 100,
                   20,  40,  60,  80, 100,  20,  40,  60,  80, 100),
              region = c("North", "North", "North", "North", "North", "North", "North", "North", "North", "North",
                         "South","South", "South", "South", "South", "South", "South", "South", "South", "South"),
              m=c(  5,  5,  5,  5,  5, 30, 30, 30, 30, 30,
               &n bsp;    5,  5,  5,  5,  5, 30, 30, 30, 30, 30),
              y=c( .005, .004, .003, .003, .002, .004, .003, .002, .002, .002,
                   .006, .004, .003, .003, .003, .005, .003, .003, .002, .002)),
    .Names=c("n","Region","m","y"),
    row.names=as.character(1:20),
    class="data.frame")
 
Plots[1:3,]
 

Plots$groupM<-ordered(Plots$m,levels=c(5,30),c("5","30"));
 

gt$lty<-c(1,3)
xlim <- range(Plots$n)
ylim <- range(Plots$y)
trellis.device(color=F)
xyplot(y~n|Region,data="" groups=groupM,xlim=xlim,ylim=ylim,subscripts=T,subset=T,layout=c(1,2),
  scales=list(relation="free"),
panel=function(x,y,subscripts,groups)
 
{
 panel.grid()
 panel.superpose(x,y,subscripts,groups,type="l",lty=c(1,3))
},
 
 main="",
 xlab="n (Stands)", 
 ylab="Standard Error",
 key=list(lines=gt,
    text=list(c("5","30")),
    columns=2,),
    strip=function(...) strip.default(...,style=1)
    )
<Prev in Thread] Current Thread [Next in Thread>
  • S-plus Users:, Lewis Jordan <=