qqPlot: Q-Q Plot

View source: R/qqPlot.R

qqPlotR Documentation

Q-Q Plot

Description

Creates a quantile-quantile (q-q) or a q-normal plot.

Usage

qqPlot(x, y, alpha = 0.4, Plot = list(name = "Paired data quantiles",
  what = "points", type = "solid", width = "standard", symbol = "circle",
  filled = TRUE, size = 0.09, color = "black"), LineRef = list(name =
  "Line of best fit", what = "lines", color = "black"),
  Line1.1 = list(name = "Line of equality", what = "lines", color =
  "gray"), yaxis.log = FALSE, yaxis.range = c(NA, NA),
  xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7,
  xlabels = 7, xtitle, ytitle, caption = "", margin = c(NA, NA, NA,
  NA), ...)

## Default S3 method:
qqPlot(x, y, alpha = 0.4, Plot = list(name =
  "Paired data quantiles", what = "points", type = "solid", width =
  "standard", symbol = "circle", filled = TRUE, size = 0.09, color =
  "black"), LineRef = list(name = "Line of best fit", what = "lines",
  color = "black"), Line1.1 = list(name = "Line of equality", what =
  "lines", color = "gray"), yaxis.log = FALSE, yaxis.range = c(NA, NA),
  xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7,
  xlabels = 7, xtitle, ytitle, caption = "", margin = c(NA, NA, NA,
  NA), ...)

Arguments

x

the x-axis data, or data to plot if y is missing.

y

the y-axis data. If missing, then produce a quantile-normal quantile plot from the data in x.

alpha

the alpha value of the function for computing plotting positions.

Plot

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

LineRef

control parameters of the reference line (best fit between x and y. See Details.

Line1.1

control parameters for the 1:1 line. Drawn only for q-q plot. See Details.

yaxis.log

logical, if TRUE, then log-transform the y axis.

yaxis.range

set the range of the y axis. See Details.

xaxis.log

logical, if TRUE, then log-transform the x axis.

xaxis.range

set the range of the x-axis. See Details.

ylabels

set the y-axis labels. See linearPretty for details.

xlabels

set the x-axis labels. See linearPretty 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.

...

any additional arguments required for specific methods.

Details

The argument what for either LineRef or Line1.1 may be set to "none" to suppress drawing of either line.

For linear axes, the range can be set to virtually any pair of values. For log axes, the choice of range is more resticted—for less than one log-cycle, powers of whole numbers can be used; from 1 to about 3 log cycles, the choces should be powers of 3 or 10; and for more than 3 log cycles, the range sould be expressed only in powers of 10.

Value

Information about the graph.

Note

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

See Also

setPage, ecdfPlot, probPlot

Examples

## Not run: 
set.seed(1)
X <- rnorm(32)
setGD()
qqPlot(X)
# For more details of qqPlot see
vignette(topic="ProbabilityPlots", package="smwrGraphs")

## End(Not run)

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