Learn R Programming

icesTAF (version 3.6.0)

taf.png: PNG Device

Description

Open PNG graphics device to export a plot into the TAF report folder.

Usage

taf.png(filename, width = 1600, height = 1200, res = 200, ...)

Arguments

filename

plot filename.

width

image width.

height

image height.

res

resolution determining the text size, line width, plot symbol size, etc.

...

passed to png.

Details

The filename can be passed without the preceding "report/", and without the ".png" filename extension.

Specifically, the function prepends "report/" to the filename if (1) the filename does not contain a "/" separator, (2) the working directory is not report, and (3) the directory report exists. The function also appends ".png" to the filename if it does not already have that filename extension.

This automatic filename manipulation can be bypassed by using the png function directly.

See Also

png is the underlying function used to open a PNG graphics device.

zoom changes text size in a lattice plot.

icesTAF-package gives an overview of the package.

Examples

Run this code
if (FALSE) {
taf.png("myplot")
plot(1)
dev.off()

library(lattice)
taf.png("mytrellis")
xyplot(1~1)
dev.off()

library(ggplot2)
taf.png("myggplot")
qplot(1, 1)
dev.off()
}

Run the code above in your browser using DataLab