addXY: Add a plot to a graph

addXYR Documentation

Add a plot to a graph

Description

Adds points or lines to the current graph.

Usage

addXY(x, y, ...)

## S4 method for signature 'ANY,numeric'
addXY(x, y, Plot = list(name = "", what =
  "lines", type = "solid", width = "standard", symbol = "circle", filled =
  TRUE, size = 0.09, color = "black"), current = list(yaxis.log = FALSE,
  yaxis.rev = FALSE, xaxis.log = FALSE), new.axis = "none",
  new.log = FALSE, new.rev = FALSE, new.range = c(NA, NA),
  new.labels = 7, new.title = "")

## S4 method for signature 'numeric,character'
addXY(x, y, Plot = list(name = "", what =
  "points", type = "solid", width = "standard", symbol = "circle", filled =
  TRUE, size = 0.09, color = "black"), current = list(yaxis.log = FALSE,
  yaxis.rev = FALSE, xaxis.log = FALSE), jitter.y = FALSE)

Arguments

x

the x-axis data. Missing values are permitted, but result in breaks in the plotted data.

y

the y-axis data. Missing values are permitted, but result in breaks in the plotted data.

...

arguments for specific methods.

Plot

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

current

the current plot information. Typically, this would be the output from one of the graph creation functions like xyPlot.

new.axis

character: indicating which new axis to set up. Must be either "right," "top," or "none," which indicates that the existing axes be used (default).

new.log

logical, if TRUE, then log transform new axis.

new.rev

logical, if TRUE, then reverse new axis.

new.range

set new-axis range.

new.labels

set up new-axis labels.

new.title

the new-axis title.

jitter.y

adjust y values to reduce overlap for each group?

Value

Information about the graph.

Methods

signature(x ="ANY", y = "numeric"

Any valid x-axis data and numeric y.

signature(x ="numeric", y = "character"

Method to add to a dot plot; the right-axis arguments are not valid.

Examples

## Not run: 
set.seed(1)
X <- rnorm(32)
Y <- X + rnorm(32)
Y2 <- X + rnorm(32, sd=0.5)
setGD()
AA.pl <- xyPlot(X, Y)
addXY(X, Y2, Plot=list(what="points", color="brown"))
# See for examples of addXY:
vignette(topic="GraphAdditions", package="smwrGraphs")
vignette(topic="GraphSetup", package="smwrGraphs")
vignette(topic="ProbabilityPlots", package="smwrGraphs")
demo(topic="DurationHydrograph", package="smwrGraphs")
demo(topic="FlowDur-Measurements", package="smwrGraphs")
demo(topic="MeasurementRating", package="smwrGraphs")
demo(topic="RightAxisExample", package="smwrGraphs")
demo(topic="TopAxisExample", package="smwrGraphs")

## End(Not run)

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