~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/rbackend/rpackages/rkward/man/rk.graph.on.Rd

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2010-10-04 14:30:00 UTC
  • mfrom: (12.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101004143000-qey73molmxxwy4w6
Tags: 0.5.4-1
* new upstream release
* bump standards version to 3.9.1 (no changes needed)
* no more need to remove svncopy.sh-script in rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\name{rk.graph.on}
 
2
\alias{rk.graph.on}
 
3
\alias{rk.graph.off}
 
4
 
 
5
\title{Copy device to HTML output}
 
6
 
 
7
\description{
 
8
  Create or copy a device to a html page which is displayed as "output" in RKWard; accessible from Windows->Show Output. \code{rk.graph.off} closes the device that was opened by \code{rk.graph.on}. The default settings for \code{device.type}, \code{width}, \code{height}, and \code{quality} can be modified from Settings -> Configure RKWard -> Output.
 
9
}
 
10
 
 
11
\usage{
 
12
rk.graph.on(device.type = getOption("rk.graphics.type"), 
 
13
            width = getOption("rk.graphics.width"), height = getOption("rk.graphics.height"), 
 
14
            quality, ...)
 
15
 
 
16
rk.graph.off()
 
17
}
 
18
\arguments{
 
19
  \item{device.type}{a string, either \code{"PNG"} or \code{"JPG"} or \code{"SVG"} or \code{NULL}. In case of \code{NULL}, the default, \code{"PNG"}, is used.}
 
20
  \item{width,height}{in pixels, the width and height of the copied device; default is 480 for both.}
 
21
  \item{quality, \dots}{other arguments passed to the device function}
 
22
}
 
23
 
 
24
\value{
 
25
  \code{rk.graph.on} invisibly returns the value of the corresponding device call, which, generally, is nothing.
 
26
  
 
27
  \code{rk.graph.off} returns the number and name of the device that was active before \code{rk.graph.on} was called, whenever possbile. When not possible it returns the number and name of the next active device as done by \code{\link{dev.off}}.
 
28
}
 
29
 
 
30
\author{Thomas Friedrichsmeier \email{rkward-devel@lists.sourceforge.net}}
 
31
 
 
32
\section{Warning}{
 
33
  \itemize{
 
34
    \item It is advised to use \code{rk.graph.off} and \bold{not} \code{dev.off} to close the device opened by \code{rk.graph.on}.
 
35
  
 
36
    \item \code{dev.print(device = rk.graph.on)} is a \bold{wrong} usage for this "device," and will result in errors.
 
37
  }
 
38
}
 
39
 
 
40
\seealso{
 
41
  \code{\link{png}}, \code{\link{svg}}, \code{\link{dev.copy}}, \code{\link{dev.off}}, \url{rkward://page/rkward_output}
 
42
}
 
43
 
 
44
\examples{
 
45
require (rkward)
 
46
 
 
47
## Plot directly to the output (html) file, by-passing screen device:
 
48
rk.graph.on ("JPG", 480, 480, 75)
 
49
plot (rnorm (100))
 
50
rk.graph.off ()
 
51
 
 
52
## Copy the displayed plot to the output:
 
53
plot (rnorm (100))
 
54
dev.copy (device = rk.graph.on)
 
55
rk.graph.off ()
 
56
 
 
57
## WRONG USAGE: not run:
 
58
#plot (rnorm (100))
 
59
#dev.print (device = rk.graph.on)
 
60
}
 
61
 
 
62
\keyword{device}