Subversion Repositories bdplot

Rev

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

Rev 21 Rev 22
Line 8... Line 8...
8
bdplot <- function(x, y=NULL, z=NULL,
8
bdplot <- function(x, y=NULL, z=NULL,
9
                   ## The rest is irrelevant for the user
9
                   ## The rest is irrelevant for the user
10
                   cex.plot=bdp()$cex.plot,
10
                   cex.plot=bdp()$cex.plot,
11
                   xaxt="n",
11
                   xaxt="n",
12
                   xlab=bdp()$xlab, ylab=bdp()$ylab,
12
                   xlab=bdp()$xlab, ylab=bdp()$ylab,
13
                   xlim=range(x,bdp()$xlim,na.rm=TRUE),
13
                   xlim=NULL,
14
                   ylim=range(bdp()$ylim,y,na.rm=TRUE),
14
                   ylim=NULL,
15
                   col=bdp()$col,main=NULL,
15
                   col=bdp()$col,main=NULL,
16
                   ## only used in case of plot mode
16
                   ## only used in case of plot mode
17
                   type=bdp()$type,
17
                   type=bdp()$type,
18
                   ## Only used in case of histogram plotting
18
                   ## Only used in case of histogram plotting
19
                   border=bdp()$border,
19
                   border=bdp()$border,
Line 40... Line 40...
40
  
40
  
41
  ## Do the plot
41
  ## Do the plot
42
  if(!is.null(y)){
42
  if(!is.null(y)){
43
    ##       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")
44
    
44
 
-
 
45
    if(is.null(xlim))
-
 
46
      xlim <- range(x,bdp()$xlim,na.rm=TRUE)
-
 
47
    if(is.null(ylim))
-
 
48
      ylim <- range(y,bdp()$ylim,na.rm=TRUE)
-
 
49
    
45
    plot(x, y,
50
    plot(x, y,
46
         type=type,
51
         type=type,
47
         xaxt=xaxt, yaxt="n",
52
         xaxt=xaxt, yaxt="n",
48
         cex=cex.plot,
53
         cex=cex.plot,
49
         xlab=xlab,
54
         xlab=xlab,
Line 67... Line 72...
67
              ...)
72
              ...)
68
      prm$draw.xaxis <- FALSE
73
      prm$draw.xaxis <- FALSE
69
      prm$draw.yaxis <- FALSE
74
      prm$draw.yaxis <- FALSE
70
      
75
      
71
    } else {
76
    } else {
-
 
77
 
-
 
78
      if(is.null(xlim))
-
 
79
        xlim <- range(c(1:length(x),bdp()$xlim),na.rm=TRUE)
-
 
80
 
-
 
81
      if(is.null(ylim))
-
 
82
        ylim <- range(x,bdp()$ylim,na.rm=TRUE)
-
 
83
      
72
      plot(x,
84
      plot(x,
73
           type=type,
85
           type=type,
74
           xaxt="n", yaxt="n",
86
           xaxt="n", yaxt="n",
75
           cex=cex.plot,
87
           cex=cex.plot,
76
           xlab=xlab,
88
           xlab=xlab,
77
           ylab=ylab,
89
           ylab=ylab,
-
 
90
           xlim=xlim,
78
           ylim=ylim,
91
           ylim=ylim,
79
           col=col,
92
           col=col,
80
           main=main,
93
           main=main,
81
           ...)
94
           ...)
82
    }
95
    }