Skip to content
Prev 5470 / 398502 Next

tick marks on mfrow=c(3,3) plot

On Mon, May 01, 2000 at 10:19:39AM -0700, Tony Long wrote:
I hacked your functions a bit to get them to work with artificial 
data, and had no problems.

my code:

three.by.three.plot <- function(ss)
  {
    par(mfrow=c(3,3))
    sub.plot(ss,-1,-1)
    sub.plot(ss,-1,0)
    sub.plot(ss,-1,1)
    sub.plot(ss,0,-1)
    sub.plot(ss,0,0)
    sub.plot(ss,0,1)
    sub.plot(ss,1,-1)
    sub.plot(ss,1,0)
    sub.plot(ss,1,1)
  }

sub.plot <- function(ss,gamma,prv)
  {
    plot(ss[ss[,"y"]==gamma & ss[,"z"]==prv,"x"],
         ss[ss[,"y"]==gamma & ss[,"z"]==prv,"plot.values"],
         type="n", xlab="4Nc", ylab="Power", las=1)
    lines(ss[ss[,"y"]==gamma & ss[,"z"]==prv,"x"],
          ss[ss[,"y"]==gamma & ss[,"z"]==prv,"plot.values"],
          type="b",lty=2,pch=15,mkh=0.11)
  }
z<-rnorm(400)
z[z < -1]<- -1
z[z > 1 ] <- 1
z[ z!= -1 & z != 1 ] <- 0
y<-rnorm(400)
y[y < -1]<- -1
y[y > 1 ] <- 1
y[ y!= -1 & y != 1 ] <- 0
x<- (1:400)/400
plot.values<- cos(x)
xyz <- cbind(x,y,z,plot.values)
three.by.three.plot(xyz)

tick marks all show up.  I'm using R 1.0.0 on Win98.  

James Marca
jmarca at translab.its.uci.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._