transPlot: X-Y Plot

View source: R/transPlot.R

transPlotR Documentation

X-Y Plot

Description

Creates an x-y plot using arbitrary monotonic transforms for the axes.

Usage

transPlot(x, xtrans, xinv, xtargs = NULL, y, ytrans, yinv,
  ytargs = NULL, Plot = list(name = "", what = "points", type =
  "solid", width = "standard", symbol = "circle", filled = TRUE, size =
  0.09, color = "black"), yaxis.range = c(NA, NA), xaxis.range = c(NA,
  NA), ylabels = "Auto", xlabels = "Auto",
  xtitle = deparse(substitute(x)), ytitle = deparse(substitute(y)),
  caption = "", margin = c(NA, NA, NA, NA))

Arguments

x

the x-axis data.

xtrans

the transformation function for the x-axis.

xinv

the inverse transformation for the x-axis.

xtargs

additional arguments to xtrans and xinv, as a list if necessary, NULL otherwise.

y

the y-axis data.

ytrans

the transformation function for the y-axis.

yinv

the inverse transformation for the y-axis.

ytargs

additional arguments to ytrans and yinv, as a list if necessary, NULL otherwise.

Plot

parameters defining the characteristics of the plot. See setPlot for a description of the parameters.

yaxis.range

set the range of the y-axis.

xaxis.range

set the range of the x-axis.

ylabels

set up y-axis labels. See transPretty for details.

xlabels

set up x-axis labels. See transPretty for details.

xtitle

the x-axis title (also called x-axis caption).

ytitle

the y-axis title (also called y-axis caption).

caption

the figure caption.

margin

set the plot area margins, in units of lines of text. Generally all NA or the output from setGraph if appropriate.

Value

Information about the graph.

Note

A call should be made to setPage to set up the graphics environment before calling transPlot.

See Also

setPage, transPretty

Examples

## Not run: 
X <- seq(.25, 9.75, by=.25)
setGD()
# The Box-Cox transform (power of 1.5)
# The labels represent the original values; the line represents the transformed value
transPlot(X, I, I, y=X, ytrans=boxCox, yinv=IboxCox, 
  ytargs=list(lambda=1.5, GM=1), Plot=list(what="lines"))
# For more details of transPlot see
demo(topic="MeasurementRating", package="smwrGraphs")

## End(Not run)

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