baytrends (version 1.1.0)

xyPlot: Plot Data

Description

Creates a line/scatter plot.

Usage

xyPlot(x, y, Plot = list(), yaxis.log = FALSE, yaxis.rev = 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), ...)

# S4 method for numeric,numeric xyPlot(x, y, Plot = list(name = "", what = "points", type = "solid", width = "standard", symbol = "circle", filled = TRUE, size = 0.09, color = "black"), yaxis.log = FALSE, yaxis.rev = FALSE, yaxis.range = c(NA, NA), xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7, xlabels = 7, xtitle = deparse(substitute(x)), ytitle = deparse(substitute(y)), caption = "", margin = c(NA, NA, NA, NA), ...)

# S4 method for factor,numeric xyPlot(x, y, Plot = list(name = "", what = "points", type = "solid", width = "standard", symbol = "circle", filled = TRUE, size = 0.09, color = "black"), yaxis.log = FALSE, yaxis.rev = FALSE, yaxis.range = c(NA, NA), xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7, xlabels = "Auto", xtitle = "", ytitle = deparse(substitute(y)), caption = "", margin = c(NA, NA, NA, NA), xlabels.rotate = FALSE, ...)

# S4 method for character,numeric xyPlot(x, y, Plot = list(name = "", what = "points", type = "solid", width = "standard", symbol = "circle", filled = TRUE, size = 0.09, color = "black"), yaxis.log = FALSE, yaxis.rev = FALSE, yaxis.range = c(NA, NA), xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7, xlabels = "Auto", xtitle = "", ytitle = deparse(substitute(y)), caption = "", margin = c(NA, NA, NA, NA), xlabels.rotate = FALSE, ...)

Arguments

x

the x-axis data to plot.

y

the y-axis data to plot.

Plot

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

yaxis.log

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

yaxis.rev

logical, if TRUE, then reverse 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 up y-axis labels. See linearPretty for details.

xlabels

set up 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.

...

additional arguments for specific methods.

xlabels.rotate

logical, if TRUE, then rotate x-axis labels 90 degrees (perpendicular to the axis).

Value

Information about the graph

Methods

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

Create a line or scatter plot from numeric x and y data.

signature(x = "factor", y ="numeric")")

Create a vertical dot plot. Also useful for setting up a bar chart for discrete x-axis values.

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

Create a vertical dot plot. Also useful for setting up a bar chart for discrete x-axis values.

Details

Setting ylabels or xlabels to 0 or negtive values will suppress ticks and labels. If negative, then try to create that absolute value number of labels. That can be useful for relative axes or specialized labeling.

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.

Added from smwrGraphs.

See Also

setPage, timePlot, colorPlot

Examples

Run this code
# NOT RUN {
set.seed(1)
X <- rnorm(32)
Y <- X + rnorm(32)
setGD()
AA.pl <- xyPlot(X, Y, Plot=list(color="cyan4"))
# For more details of xyPlot see
vignette(topic="GraphAdditions", package="smwrGraphs")
vignette(topic="GraphGallery", package="smwrGraphs")
vignette(topic="GraphSetup", package="smwrGraphs")
vignette(topic="LineScatter", package="smwrGraphs")
demo(topic="Coplot-complexScatterPlot", package="smwrGraphs")
demo(topic="TopAxisExample", package="smwrGraphs")
# }

Run the code above in your browser using DataLab