Subversion Repositories bdplot

Rev

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

Rev 5 Rev 27
Line 1... Line 1...
1
\name{bdopen}
1
\name{bdopen}
2
\alias{bdopen}
2
\alias{bdopen}
3
%- Also NEED an '\alias' for EACH other topic documented here.
3
%- Also NEED an '\alias' for EACH other topic documented here.
4
\title{ ~~function to do ... ~~ }
4
\title{A graphics device overlayer}
5
\description{
5
\description{
6
  ~~ A concise (1-5 lines) description of what the function does. ~~
6
A function that opens relevant the relevant device based on "file",
-
 
7
either applied with bdp() or as an argument.
7
}
8
}
8
\usage{
9
\usage{
9
bdopen(filename = prm$filename)
10
bdopen(file=bdp()$file,paper=bdp()$paper,mfrow=bdp()$mfrow,scale=TRUE)
10
}
11
}
11
%- maybe also 'usage' for other objects documented here.
12
%- maybe also 'usage' for other objects documented here.
12
\arguments{
13
\arguments{
-
 
14
  \item{file}{An optional character string denoting the file to which
-
 
15
    graphics will be written if it has one of "ps, eps, pdf, jpg, jpeg"
-
 
16
    as ending. If file does not have one of these endings, graphics are
-
 
17
    written to the X11 driver (which only works on systems using X11,
-
 
18
    i.e. Linux, Solaris, some BSD, etc.)}
13
  \item{filename}{ ~~Describe \code{filename} here~~ }
19
  \item{paper}{What paper standard to write for. Currently,
-
 
20
    "a4","a4.half","b5","b5.half", and "a4.word" are implemented. This
-
 
21
    can also be applied with bdp().}
-
 
22
  \item{mfrow}{See ?par}
-
 
23
  \item{scale}{Only relevant if writing to screen. If TRUE, device will
-
 
24
    be scaled to double size. Notice however, that currently only the
-
 
25
    device itself is scaled, not the contents.}
14
}
26
}
15
\details{
27
\details{
16
  ~~ If necessary, more details than the description above ~~
-
 
17
}
28
}
18
\value{
-
 
19
  ~Describe the value returned
-
 
20
  If it is a LIST, use
-
 
21
  \item{comp1 }{Description of 'comp1'}
-
 
22
  \item{comp2 }{Description of 'comp2'}
-
 
23
  ...
-
 
24
}
-
 
25
\references{ ~put references to the literature/web site here ~ }
29
\references{SVN: http://svn.imm.dtu.dk/svn/bdplot/bdgraphics}
26
\author{ ~~who you are~~ }
30
\author{Peder Bacher, Philip Delff}
27
\note{ ~~further notes~~ 
-
 
28
 
-
 
29
 ~Make other sections like Warning with \section{Warning }{....} ~
-
 
30
}
-
 
31
\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
31
\seealso{bdgraphics, bdp, bdplot, bddev.off}
32
\examples{
32
\examples{
33
##---- Should be DIRECTLY executable !! ----
-
 
34
##-- ==>  Define data, use random,
-
 
35
##--	or do  help(data=index)  for the standard data sets.
-
 
36
 
-
 
37
## The function is currently defined as
-
 
38
function (filename = prm$filename) 
33
bdp(file="example.ps")
39
{
-
 
40
    prm <- .BDPars
-
 
41
    if (!is.na(filename)) {
-
 
42
        if (!is.null(prm$figdir) & !is.na(prm$figdir)) {
-
 
43
            prm$filename <- paste(prm$figdir, prm$filename, sep = "")
-
 
44
        }
-
 
45
        nchars <- nchar(prm$filename)
-
 
46
        if (any(substr(prm$filename, nchars - 2, nchars) == ".ps", 
-
 
47
            substr(prm$filename, nchars - 3, nchars) == ".eps")) {
-
 
48
            m <- {
-
 
49
                cat("B/D plotting writing to postscript file\n")
-
 
50
                postscript(file = prm$filename, width = prm$width, 
-
 
51
                  height = prm$height, paper = "special", horizontal = FALSE, 
-
 
52
                  family = "Helvetica")
-
 
53
            }
-
 
54
        }
34
bdopen()
55
        else if (substr(prm$filename, nchars - 3, nchars) == 
-
 
56
            ".pdf") {
35
bdplot(x <- -10:10, x^2)
57
            pdf(file = prm$filename, width = prm$width, height = prm$height)
-
 
58
        }
-
 
59
    }
-
 
60
    else {
-
 
61
        x11()
36
bddev.off()
62
    }
-
 
63
    par(mfrow = prm$mfrow)
-
 
64
  }
-
 
65
}
37
}
66
% Add one or more standard keywords, see file 'KEYWORDS' in the
-
 
67
% R documentation directory.
-
 
68
\keyword{ ~kwd1 }
38
\keyword{iplot}
69
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
-