Subversion Repositories bdplot

Rev

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

Rev 5 Rev 7
Line 1... Line 1...
1
### bdopen
1
### bdopen
2
### Used to open a graphics driver with BDplot.
2
### Used to open a graphics driver with BDplot.
3
 
3
 
-
 
4
### In both jpeg and X11,  height  and width are scaled to
-
 
5
### jpeg: get a decent resolution (can't get it working with the true distances...)
-
 
6
### X11: to get a nicer window on the screen.
-
 
7
### This hack is ugly. At least there should be a scaling factor in stead so that all measures are scaled (fonts, etc).
-
 
8
 
4
bdopen <- function(file=bdp()$file,paper=bdp()$paper,mfrow=bdp()$mfrow)
9
bdopen <- function(file=bdp()$file,paper=bdp()$paper,mfrow=bdp()$mfrow)
5
{
10
{
6
  .bdcalcsizes(paper=paper)
11
  .bdcalcsizes(paper=paper)
7
  prm <- .bdgetpars()
12
  prm <- .bdgetpars()
8
  if( !is.na(prm$file) )
13
  if( !is.na(prm$file) )
Line 29... Line 34...
29
##          bitmap(file=prm$file,type="jpeg",width=prm$width,height=prm$height,units=prm$size.unit,res=prm$jpeg.res,pointsize=.3)
34
##          bitmap(file=prm$file,type="jpeg",width=prm$width,height=prm$height,units=prm$size.unit,res=prm$jpeg.res,pointsize=.3)
30
        }
35
        }
31
    }
36
    }
32
  else {
37
  else {
33
    ## to X. Note that this doesn't work on win and osx.
38
    ## to X. Note that this doesn't work on win and osx.
34
    x11()
39
    X11(height=prm$height*2,width=prm$width*2)
35
    }
40
    }
36
 
41
 
37
  par(mfrow=mfrow)
42
  par(mfrow=mfrow)
38
 }
43
 }