Subversion Repositories bdplot

Rev

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

Rev 53 Rev 61
Line 17... Line 17...
17
        {
17
        {
18
          file <- paste(prm$figdir,file,sep="/")
18
          file <- paste(prm$figdir,file,sep="/")
19
        }
19
        }
20
      ## determining device driver from filename
20
      ## determining device driver from filename
21
      nchars <- nchar(file)
21
      nchars <- nchar(file)
22
 
-
 
-
 
22
##### should switch be used here?
23
      if( any( substr(file,nchars-2,nchars)==".ps",substr(file,nchars-3,nchars)==".eps")){
23
      if( any( substr(file,nchars-2,nchars)==".ps",substr(file,nchars-3,nchars)==".eps")){
24
        m <- {
24
        m <- {
25
          cat("B/D plotting writing to postscript file\n")
25
          cat("B/D plotting writing to postscript file\n")
26
          postscript(file=file, width=prm$width, height=prm$height, paper="special", family = "Helvetica", horizontal=FALSE)
26
          postscript(file=file, width=prm$width, height=prm$height, paper="special", family = "Helvetica", horizontal=FALSE)
27
        }
27
        }
Line 32... Line 32...
32
          cat("Writing to jpeg file\n")
32
          cat("Writing to jpeg file\n")
33
          if(is.null(quality))
33
          if(is.null(quality))
34
            quality=prm$jpeg.quality
34
            quality=prm$jpeg.quality
35
          jpeg(filename=file,width=prm$width,height=prm$height,units=prm$size.unit,quality=quality,res=prm$jpeg.res,type="cairo")
35
          jpeg(filename=file,width=prm$width,height=prm$height,units=prm$size.unit,quality=quality,res=prm$jpeg.res,type="cairo")
36
### bitmap(file=file,type="jpeg",width=prm$width,height=prm$height,units=prm$size.unit,res=prm$jpeg.res,pointsize=.3)
36
### bitmap(file=file,type="jpeg",width=prm$width,height=prm$height,units=prm$size.unit,res=prm$jpeg.res,pointsize=.3)
-
 
37
        } else if ( substr(file,nchars-3,nchars)==".tex"){
-
 
38
          require(tikzDevice)
-
 
39
          cat("Writing to tikz file\n")
-
 
40
          tikz(file=file)
37
        }
41
        }
38
    }
-
 
39
  else {
42
    } else {
40
 
43
 
41
    if(scale){
44
    if(scale){
42
      prm$height <- prm$height*2
45
      prm$height <- prm$height*2
43
      prm$width <- prm$width*2
46
      prm$width <- prm$width*2
44
    }
47
    }