Subversion Repositories bdplot

Rev

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

Rev 37 Rev 42
Line 8... Line 8...
8
                   ## The rest is irrelevant for the user
8
                   ## The rest is irrelevant for the user
9
                   cex.plot=bdp()$cex.plot,
9
                   cex.plot=bdp()$cex.plot,
10
                   xaxt=bdp()$xaxt,yaxt=bdp()$yaxt,
10
                   xaxt=bdp()$xaxt,yaxt=bdp()$yaxt,
11
                   xaxt.in=bdp()$xaxt.in,yaxt.in=bdp()$xaxt.in,
11
                   xaxt.in=bdp()$xaxt.in,yaxt.in=bdp()$xaxt.in,
12
                   xlab=bdp()$xlab, ylab=bdp()$ylab,
12
                   xlab=bdp()$xlab, ylab=bdp()$ylab,
-
 
13
                   tlab=bdp()$tlab, rlab=bdp()$rlab,
13
                   xlim=bdp()$xlim,ylim=bdp()$ylim,
14
                   xlim=bdp()$xlim,ylim=bdp()$ylim,
14
                   col=bdp()$col,main=NULL,
15
                   col=bdp()$col,main=NULL,
15
                   ## only used in case of plot mode
16
                   ## only used in case of plot mode
16
                   type=bdp()$type,
17
                   type=bdp()$type,
17
                   ## Only used in case of histogram plotting
18
                   ## Only used in case of histogram plotting
18
                   border=bdp()$border,
19
                   border=bdp()$border,
19
                   ...)
20
                   ...){
20
{
-
 
21
 
21
 
22
 
22
 
23
  ## experimental. Is this the right consequence of not having a
23
  ## experimental. Is this the right consequence of not having a
24
  ## device opened?
24
  ## device opened?
25
  
25
  
Line 52... Line 52...
52
    }
52
    }
53
    mar
53
    mar
54
  }
54
  }
55
  mar[1] <- detmar(1,xlab)
55
  mar[1] <- detmar(1,xlab)
56
  mar[2] <- detmar(2,ylab)
56
  mar[2] <- detmar(2,ylab)
57
    ##  if( !is.na(prm$xlab) ){ mar[1] <- prm$mar.lab[1] }
57
  mar[3] <- detmar(3,tlab)
58
  #if( !is.na(prm$ylab) ){ mar[2] <- prm$mar.lab[2] }
58
  mar[4] <- detmar(4,rlab)
-
 
59
    
59
  if( any(!is.na(prm$toplab),!is.null(main)) ) { mar[3] <- prm$mar.lab[3] }
60
  ## if( any(!is.na(prm$toplab),!is.null(main)) ) { mar[3] <- prm$mar.lab[3] }
60
  if( !is.na(prm$rightlab) ){ mar[4] <- prm$mar.lab[4] }
61
  ## if( !is.na(prm$rightlab) ){ mar[4] <- prm$mar.lab[4] }
61
  par(mar=mar)
62
  par(mar=mar)
62
 
63
 
63
  par(mgp=prm$mgp.global)
64
  par(mgp=prm$mgp.global)
64
  
65
  
65
### xaxt and yaxt can be set to "axis" which is the special case where the axis is drawn with the axius
66
### xaxt and yaxt can be set to "axis" which is the special case where the axis is drawn with the axius
Line 91... Line 92...
91
    draw.yaxis <- FALSE
92
    draw.yaxis <- FALSE
92
  }
93
  }
93
  
94
  
94
 
95
 
95
 
96
 
96
### this variable needs to be initialized
97
### this variable needs to be initialized. Why?
97
  addcase <- NULL
98
  addcase <- NULL
98
  
99
  
99
  ## Do the plot
100
  ## Do the plot
100
  if(!is.null(y)){
101
  if(!is.null(y)){
101
 
102
 
Line 278... Line 279...
278
 
279
 
279
 
280
 
280
  ##Title stuff
281
  ##Title stuff
281
  ## Hvorfor??
282
  ## Hvorfor??
282
  scale <- 1
283
  scale <- 1
-
 
284
 
283
  ##  if( prm$type=="hist" & !is.na(prm$xlab) )
285
  ##  if( prm$type=="hist" & !is.na(prm$xlab) )
284
#  if( !is.na(prm$xlab)  ){ mtext(prm$xlab, line=prm$xlabLine, side=1, cex=prm$cex.lab/scale) }
286
#  if( !is.na(prm$xlab)  ){ mtext(prm$xlab, line=prm$xlabLine, side=1, cex=prm$cex.lab/scale) }
285
  ##  if( prm$type=="hist" &!is.na(prm$ylab) )
287
  ##  if( prm$type=="hist" &!is.na(prm$ylab) )
286
#  if( !is.na(prm$ylab)  ){ mtext(prm$ylab, line=prm$ylabLine, side=2, cex=prm$cex.lab/scale) }
288
#  if( !is.na(prm$ylab)  ){ mtext(prm$ylab, line=prm$ylabLine, side=2, cex=prm$cex.lab/scale) }
287
  if( !is.na(prm$toplab) ){ mtext(prm$toplab, side=3, line=0.25, cex=prm$cex.lab/scale) }
289
  if( !is.na(prm$tlab) ){ mtext(prm$tlab, side=3, line=0.25, cex=prm$cex.lab/scale) }
288
  if( !is.na(prm$rightlab) ){
290
  if( !is.na(prm$rlab) ){
289
    mtext(prm$rightlab, side=4, line=0.75, cex=prm$cex.lab/scale,mgp=prm$mgp.raxis)
291
    mtext(prm$rlab, side=4, line=0.75, cex=prm$cex.lab/scale,mgp=prm$mgp.raxis)
290
##    mtext(rightlab, side=4, line=0.5, cex=bdp()$cex.lab,mgp=bdp()$mgp.raxis)
-
 
291
  }
292
  }
292
}
293
}
293
 
294
 
294
 
295
 
295
 
296