Subversion Repositories bdplot

Rev

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

Rev 7 Rev 8
Line 158... Line 158...
158
  if( !is.na(prm$toplab) ){ mtext(prm$xxlab, side=3, line=0.25, cex=prm$cex.lab/scale) }
158
  if( !is.na(prm$toplab) ){ mtext(prm$xxlab, side=3, line=0.25, cex=prm$cex.lab/scale) }
159
  if( !is.na(prm$rightlab) ){ mtext(prm$yylab, side=4, line=0.25, cex=prm$cex.lab/scale) }
159
  if( !is.na(prm$rightlab) ){ mtext(prm$yylab, side=4, line=0.25, cex=prm$cex.lab/scale) }
160
}
160
}
161
 
161
 
162
 
162
 
163
## a function to add points or lines to a plot. det kan skrives meget
-
 
164
## paenere, om en streng indeholder en karakter.
-
 
165
 
-
 
166
## grep("l",type)
-
 
167
 
-
 
168
bdxyadd <- function(x,y=NULL,type=bdp()$type,lwd=bdp()$lwd,pch=bdp()$pch,col=bdp()$col,...){
-
 
169
 
-
 
170
  prm <- .bdgetpars()
-
 
171
  
-
 
172
  if(any(type=="p",type=="l",type=="s")){
-
 
173
    if(!is.null(y)){
-
 
174
      points(x,y,cex=prm$cex.plot,pch=prm$pch,type=type,col=col,...)
-
 
175
    } else {
-
 
176
      points(x,cex=prm$cex.plot,pch=prm$pch,col=col,type=type,...)
-
 
177
    }
-
 
178
  } else if (type=="lp"|type=="pl"){
-
 
179
    if(!is.null(y)){
-
 
180
      points(x,y,cex=prm$cex.plot,pch=prm$pch,col=col,...)
-
 
181
      lines(x,y,lwd=lwd,col=col,...)
-
 
182
    } else {
-
 
183
      points(x,cex=prm$cex.plot,pch=prm$pch,col=col,...)
-
 
184
      lines(x,lwd=lwd,col=col,...)
-
 
185
    }
-
 
186
  }
-
 
187
}
-
 
188
 
-
 
189
 
-
 
190
bdlegend <- function(legend,cex=bdp()$cex.legend,x=bdp()$pos.legend,bg=bdp()$bg.legend,col=bdp()$col,...){
-
 
191
  prm <- .bdgetpars()
-
 
192
  ## dette er noget rod med baade x og pos, hvis man giver begge dele fucker det op.
-
 
193
  legend(x=x,
-
 
194
         cex=cex,
-
 
195
         legend=legend,
-
 
196
         bg=bg,
-
 
197
         col=col,
-
 
198
         ...)
-
 
199
  
-
 
200
}
-
 
201
 
163