Line 21... |
Line 21... |
21 |
nchars <- nchar(prm$file)
|
21 |
nchars <- nchar(prm$file)
|
22 |
|
22 |
|
23 |
if( any( substr(prm$file,nchars-2,nchars)==".ps",substr(prm$file,nchars-3,nchars)==".eps")){
|
23 |
if( any( substr(prm$file,nchars-2,nchars)==".ps",substr(prm$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=prm$file, width=prm$width, height=prm$height, paper="special", horizontal=FALSE, family = "Helvetica")
|
26 |
postscript(file=prm$file, width=prm$width, height=prm$height, paper="special", family = "Helvetica", horizontal=FALSE)
|
27 |
}
|
27 |
}
|
28 |
} else if ( substr(prm$file,nchars-3,nchars)==".pdf")
|
28 |
} else if ( substr(prm$file,nchars-3,nchars)==".pdf")
|
29 |
{
|
29 |
{
|
30 |
pdf(file=prm$file, width=prm$width, height=prm$height)
|
30 |
pdf(file=prm$file, width=prm$width, height=prm$height, paper="special",family = "Helvetica")
|
31 |
} else if (any(substr(prm$file,nchars-3,nchars)==".jpg", substr(prm$file,nchars-4,nchars)==".jpeg")) {
|
31 |
} else if (any(substr(prm$file,nchars-3,nchars)==".jpg", substr(prm$file,nchars-4,nchars)==".jpeg")) {
|
32 |
cat("Writing to jpeg file\n")
|
32 |
cat("Writing to jpeg file\n")
|
33 |
jpeg(filename=prm$file,width=prm$width*2,height=prm$height*2,units=prm$size.unit,quality=prm$jpeg.quality,res=prm$jpeg.res,type="cairo")
|
33 |
jpeg(filename=prm$file,width=prm$width,height=prm$height,units=prm$size.unit,quality=prm$jpeg.quality,res=prm$jpeg.res,type="cairo")
|
34 |
## 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)
|
35 |
}
|
35 |
}
|
36 |
}
|
36 |
}
|
37 |
else {
|
37 |
else {
|
38 |
## 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.
|
39 |
X11(height=prm$height*2,width=prm$width*2)
|
39 |
X11(height=prm$height*2,width=prm$width*2)
|