baytrends (version 1.1.0)

setGD: Graphics Page

Description

Sets up a graphics page. The functions setPage, setRStudio, and setGD set up onscreen devices. The functions setPDF, setSweave, setKnitr, and setPNG set up files for graphics output.

Usage

setGD(name = "USGS")

setPage(layout = "portrait", font = "preview", name = "USGS", multiple = FALSE, device = "default")

Arguments

name

the name of the graphics page or the filename for setSweave.

layout

A description of the orientation and shape of the graphics page. See Details.

font

a description of the font. The choices are "preview," which is 12 point Arial Narrow; "USGS," which is 8 point Arial Narrow; "EST," which is 8 point Times New Roman; "PPT," which is 24 point Arial; and "PDF," which is 8 point Arial Helvetica-Narrow. "PDF" should be chosen if the graphs are to be saved to a portable document format (pdf) file.

multiple

logical, if TRUE, then allow multiple pages.

device

the name of the graphics device. See Details.

basename

the base name of the pdf file name.

multiplefiles

logical, if TRUE, then modify basename to create multiple files for multiple pages.

height

the height of the graphics page.

width

the width of the graphics page.

additional arguments, which are ignored by setSweave, setKnitr, and setPNG.

Value

For setPage and setPDF, a list with two components: dev, the device number; and name, the name or basename. For setGD setSweave, setKnitr, setPNG, and setRStudio nothing is returned.

Details

If layout is "portrait," then the page size is 8.5 by 11 inches and the graph area is 7.25 by 9.5 inches.

If layout is "landscape," then the page size is 11 by 8.5 inches and the graph area is 9.5 by 7.25 inches.

If layout is "square," then the page size is 7 by 7 inches and the graph area is 6.5 by 6.5 inches (setPage only).

If layout is "slide," then the page size is 10 by 7.5 inches and the graph area is 9.5 by 7.0 inches (setPage only).

Layout may also be a tagged list, with components width and height giving the width and height of the page, the width and height of the graph area is 0.5 inch less that the page, except for setPDF where it is 0.1 inch less.

The user may specify a graphics device other than the default for the system. This may be necessary when running under certain user environments like RStudio (TM).

Added from smwrGraphs.

Examples

Run this code
# NOT RUN {
# See for examples of setGD:
demo(topic="AnnualFlowBarChart", package="smwrGraphs")
demo(topic="Coplot-complexScatterPlot", package="smwrGraphs")
demo(topic="Coplot-simpleBoxPlot", package="smwrGraphs")
demo(topic="DurationHydrograph", package="smwrGraphs")
demo(topic="FlowDur-Measurements", package="smwrGraphs")
demo(topic="HydroPrecip", package="smwrGraphs")
# See for examples of setPage:
demo(topic="PiperScript", package="smwrGraphs")
# See for examples of setPDF:
demo(topic="MeasurementRating", package="smwrGraphs")
demo(topic="PiperScript", package="smwrGraphs")
demo(topic="RightAxisExample", package="smwrGraphs")
demo(topic="TopAxisExample", package="smwrGraphs")
# See for examples of setSweave:
vignette(topic="BoxPlots", package="smwrGraphs")
vignette(topic="DateAxisFormats", package="smwrGraphs")
vignette(topic="GraphAdditions", package="smwrGraphs")
vignette(topic="GraphGallery", package="smwrGraphs")
vignette(topic="GraphSetup", package="smwrGraphs")
vignette(topic="LineScatter", package="smwrGraphs")
vignette(topic="PiperPlot", package="smwrGraphs")
vignette(topic="ProbabilityPlots", package="smwrGraphs")
# }

Run the code above in your browser using DataLab