Subversion Repositories bdplot

Rev

Rev 12 | Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 15
Line 37... Line 37...
37
  par(mar=mar)
37
  par(mar=mar)
38
 
38
 
39
  par(mgp=prm$mgp.global)
39
  par(mgp=prm$mgp.global)
40
  
40
  
41
  ## Do the plot
41
  ## Do the plot
42
  ## the method variable could be used more intelligently. If x is numeric, only three methods are possible: plot, barplot, image.plot.
-
 
43
    ## maybe this check can be skipped. I guess x and y can just be deleted from these commands  
-
 
44
 ## if( prm$method=="xy"){
-
 
45
  
-
 
46
  if(!is.null(y)){
42
  if(!is.null(y)){
47
    ##       cat("The Bacher/Delff Plotting System (R), (C), TM operating in xy-plotting mode.\n")
43
    ##       cat("The Bacher/Delff Plotting System (R), (C), TM operating in xy-plotting mode.\n")
48
    
44
    
49
    plot(x, y,
45
    plot(x, y,
50
         type=type,
46
         type=type,
Line 87... Line 83...
87
  } else if( class(x) == "acf"){
83
  } else if( class(x) == "acf"){
88
    ## Not cleaned up/checked
84
    ## Not cleaned up/checked
89
    plot(x, xlab="", ylab="", xaxt="n", yaxt="n", cex=prm$cex.plot, xlim=prm$xlim, ylim=prm$ylim,col=col,...)
85
    plot(x, xlab="", ylab="", xaxt="n", yaxt="n", cex=prm$cex.plot, xlim=prm$xlim, ylim=prm$ylim,col=col,...)
90
  }
86
  }
91
  else if( class(x) == "histogram"){
87
  else if( class(x) == "histogram"){
92
    ## Notice: the color of the bars can ONLY be set with bdp(hcol="color").
88
    ## Notice: the color of the bars can ONLY be set width bdp(hcol="color").
93
    plot(x,
89
    plot(x,
94
         xlab=xlab, ylab=ylab,
90
         xlab=xlab, ylab=ylab,
95
         main=prm$main,
91
         main=prm$main,
96
         xaxt="n",yaxt="n",col=bdp()$hcol,
92
         xaxt="n",yaxt="n",col=bdp()$hcol,
97
         border=border,
93
         border=border,
Line 107... Line 103...
107
    ## with lattice/trellis, the axis drawing doesn't work.
103
    ## with lattice/trellis, the axis drawing doesn't work.
108
    prm$draw.xaxis <- FALSE
104
    prm$draw.xaxis <- FALSE
109
    prm$draw.yaxis <- FALSE
105
    prm$draw.yaxis <- FALSE
110
  }
106
  }
111
  else if (prm$method=="image.plot"){
107
  else if (prm$method=="image.plot"){
-
 
108
    ### This could be checked in the beginning by is.null(z)
112
    cat("The Bacher/Delff Plotting System (R), (C), TM operating in image plotting mode.\nx and y axis can not be configured.\n")
109
    cat("The Bacher/Delff Plotting System (R), (C), TM operating in image plotting mode.\nx and y axis can not be configured.\n")
113
    image.plot(x=x,y=y,z=z,
110
    image.plot(x=x,y=y,z=z,
114
               xlab=xlab,
111
               xlab=xlab,
115
               ylab=ylab,
112
               ylab=ylab,
116
               ...)
113
               ...)