smwrGraphs-package: Graphing Functions

smwrGraphs-packageR Documentation

Graphing Functions

Description

Functions to create high-quality graphs.
These graphs meet or nearly meet the publication standards for illustrations of the U.S. Geological Survey (USGS) (U.S. Geological Survey, written commun., 2012). They are intended to be a suite of integrated functions that make producing graphs and figures relatively easy by passing much information about the plots between functions so the user does not need to manage graphical information.

Details

Package: smwrGraphs
Type: Package
License: CC0
Depends: smwrBase (>= 1.0.0), methods
Imports: KernSmooth, akima, lubridate
Suggests: smwrData (>= 1.0.0), dataRetrieval

The functions in the smwrGraphs package are an integrated suite of functions that facilitate the production of graphs that nearly meet USGS publication standards for illustrations (U.S. Geological Survey, written commun., 2012). Those standards include line weight, tick placement, labels, font size, and layout of the explanation. The font used in production very closely matches the standard Univers Condensed, and was selected because of its broad availability on many computer platforms.

Use of base R or other graphics functions can result in inconsistent lineweights, font sizes and styles, and can require manual manipulation of the explanation. The Programmer's Guide section in Lorenz (2015) shows examples of calls to lower level graphics functions in base R that produce consistent graphics products.

Functions to set up and initialize the smwrGraphs environment:
preSurface
setGD
setGraph
setKnitr
setLayout
setPDF
setPage
setPNG
setRStudio
setRtMargin
setSplom
setSweave
setTopMargin

Main plotting functions:
areaPlot
biPlot
boxPlot
colorPlot
condition
contourPlot
corGram
dendGram
dotPlot
ecdfPlot
histGram
piperPlot
probPlot
qqPlot
reportGraph
scalePlot
seasonPlot
splomPlot
seriesPlot
stiffPlot
surfacePlot
ternaryPlot
timePlot
transPlot
xyPlot
condition

Functions to add features to a plot:
addAnnotation
addArea
addAxisLabels
addCaption
addCI
addErrorBars
addExplanation
addGrid
addLabel
addMinorTicks
addPiper
addSLR
addSmooth
addStiff
addTable
addTernary
addTitle
addXY
labelPoints
refLine

Data Manipulation Functions for Graphs:
cov2Ellipse
dataEllipse
hull
interpLine
paraSpline

# Color palettes:
blueRed.colors
coolWarm.colors
greenRed.colors
pastel.colors
redBlue.colors
redGreen.colors
warmCool.colors

Selected Miscellaneous Functions:
copyDemo
strip.blanks

Author(s)

Dave Lorenz

References

Lorenz, D.L., Diekoff, A.L, smwrGraphs—an R package for graphing hydrologic data, version 1.1.2.
U.S. Geological Survey, 2012, Author's guide to standards for U.S. Geological Survey page-size illustrations, 37 p. https://pubs.er.usgs.gov/publication/ofr20161188

Examples


# For these examples, print to console
.pager <- options("pager")
options(pager="console")
# See the demo for examples of how to use the functions in this library.
demo(package="smwrGraphs")
# A simple listing of the vignettes in this package:
vignette(package="smwrGraphs")
options(.pager)


USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.