Subversion Repositories bdplot

Rev

Rev 56 | Rev 59 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 56 Rev 58
Line 63... Line 63...
63
      } else {
63
      } else {
64
        mar <- prm$mar.lab[idx]
64
        mar <- prm$mar.lab[idx]
65
      }
65
      }
66
      return(mar)
66
      return(mar)
67
    }
67
    }
-
 
68
##    browser()
68
    mar <- c(detmar(1,xlab),
69
    mar <- c(detmar(1,xlab),
69
             detmar(2,ylab),
70
             detmar(2,ylab),
70
             detmar(3,tlab),
71
             detmar(3,tlab)+ifelse(is.null(main),0,prm$mar.main),
71
             detmar(4,rlab))
72
             detmar(4,rlab))
-
 
73
##    print(length(mar))
72
    
74
##    print(mar)    
73
  }
75
  }
74
  par(mar=mar)
76
  par(mar=mar)
75
 
77
 
76
  par(mgp=prm$mgp.global)
78
  par(mgp=prm$mgp.global)
77
 
79
 
Line 196... Line 198...
196
    plot(x, xlab="", ylab="", xaxt=xaxt, yaxt=yaxt, cex=prm$cex.plot, xlim=prm$xlim, ylim=prm$ylim,col=col,...)
198
    plot(x, xlab="", ylab="", xaxt=xaxt, yaxt=yaxt, cex=prm$cex.plot, xlim=prm$xlim, ylim=prm$ylim,col=col,...)
197
  }  else if( class(x) == "histogram"){
199
  }  else if( class(x) == "histogram"){
198
    ## Notice: the color of the bars can ONLY be set width bdp(hcol="color").
200
    ## Notice: the color of the bars can ONLY be set width bdp(hcol="color").
199
    plot(x,
201
    plot(x,
200
         xlab=xlab,ylab=ylab,
202
         xlab=xlab,ylab=ylab,
201
         main=prm$main,freq=freq,
203
         main=main,freq=freq,
202
         xaxt=xaxt,yaxt=yaxt,col=bdp()$hcol,
204
         xaxt=xaxt,yaxt=yaxt,col=bdp()$hcol,
203
         border=border,
205
         border=border,
204
         ...)
206
         ...)
205
  } else if( class(x) == "trellis"){
207
  } else if( class(x) == "trellis"){
206
    ## Not cleaned up/checked
208
    ## Not cleaned up/checked
Line 215... Line 217...
215
    draw.yaxis <- FALSE
217
    draw.yaxis <- FALSE
216
  } else if (class(x)=="princomp") {
218
  } else if (class(x)=="princomp") {
217
    if(prm$debug)
219
    if(prm$debug)
218
      cat("The Bacher/Delff Plotting System operating in princomp plotting mode.\n")
220
      cat("The Bacher/Delff Plotting System operating in princomp plotting mode.\n")
219
    plot(x,
221
    plot(x,
220
         main=prm$main,
222
         main=main,
221
         ...)
223
         ...)
222
  } else if (class(x)=="lm") {
224
  } else if (class(x)=="lm") {
223
    print("lm mode. This is experimental, mar and oma are set to fixed values.")
225
    print("lm mode. This is experimental, mar and oma are set to fixed values.")
224
    par(mar=c(2,2,2,.3))
226
    par(mar=c(2,2,2,.3))
225
    par(oma = c(0, 0, 0, 0))
227
    par(oma = c(0, 0, 0, 0))
226
    par(cex=0.4)
228
    par(cex=0.4)
227
    ### cex.caption is the title over each plot, cex.id magnification of point labels. What is eg "Cook's distance" written inside the plots?
229
    ### cex.caption is the title over each plot, cex.id magnification of point labels. What is eg "Cook's distance" written inside the plots?
228
    plot.lm(x,cex.caption=cex.sub,cex.id=.5)##,cex=cex.plot)
230
    plot.lm(x,cex.caption=cex.sub,cex.id=.5)##,cex=cex.plot)
229
  }  else if (class(x)=="data.frame") {
231
  }  else if (class(x)=="data.frame") {
230
    print("data.frame mode")
232
    print("data.frame mode")
231
    plot(x,main=prm$main,
233
    plot(x,main=main,
232
         xaxt=xaxt,yaxt=yaxt)
234
         xaxt=xaxt,yaxt=yaxt)
233
  }else if (prm$method=="image.plot"){
235
  }else if (prm$method=="image.plot"){
234
    ### This could be checked in the beginning by is.null(z)
236
    ### This could be checked in the beginning by is.null(z)
235
  }
237
  }
236
  
238