dotPlot: Dot Plot

dotPlotR Documentation

Dot Plot

Description

Creates a dot plot.

Usage

dotPlot(x, y, Plot = list(), yaxis.orient = "", yaxis.order = "",
  yaxis.grid = TRUE, xaxis.log = FALSE, xaxis.range = c(NA, NA),
  ylabels = "", xlabels = 7, xtitle = "", ytitle = "",
  caption = "", margin = c(NA, NA, NA, NA), ...)

## S4 method for signature 'numeric'
dotPlot(x, y, Plot = list(name = "", what = "points",
  type = "solid", width = "standard", symbol = "circle", filled = TRUE,
  size = 0.09, color = "black"), yaxis.orient = "table",
  yaxis.order = "none", yaxis.grid = TRUE, xaxis.log = FALSE,
  xaxis.range = c(NA, NA), ylabels = "full", xlabels = 7,
  xtitle = deparse(substitute(x)), ytitle = "", caption = "",
  margin = c(NA, NA, NA, NA), jitter.y = TRUE, ...)

## S4 method for signature 'Date'
dotPlot(x, y, Plot = list(name = "", what = "points",
  type = "solid", width = "standard", symbol = "circle", filled = TRUE,
  size = 0.09, color = "black"), yaxis.orient = "table",
  yaxis.order = "none", yaxis.grid = TRUE, xaxis.log = FALSE,
  xaxis.range = range(x, na.rm = TRUE), ylabels = "full",
  xlabels = "Auto", xtitle = "", ytitle = "", caption = "",
  margin = c(NA, NA, NA, NA), jitter.y = TRUE, ...)

Arguments

x

the x-axis data. Missing values are permitted and not plotted.

y

the y-axis data, expected to be be either character or factor. Missing values are permitted and removed before plotting.

Plot

control parameters of the plot, see link{setMultiPlot} and Details for details.

yaxis.orient

orientation of the y-axis values, must be either "table" or "grid." "Table" is sorted from top to bottom, "grid" is sorted from bottom to top.

yaxis.order

the order of the y-axis values, must be one of "none," "ascending," or "descending."

yaxis.grid

logical, if TRUE, then draw grid lines.

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.

xlabels

set up x-axis labels.

xtitle

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

ytitle

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.

...

arguments for specific methods.

jitter.y

logical, if TRUE, then adjust y values to reduce overlap for each group, or adjust randomly if no groups. If FALSE, then no adjustment is made.

Details

The what component of the Plot argument must be either "points" or "none."

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.

Methods

signature(x = "numeric"))

Create a dot plot for numeric x-coordinate data and any (discrete) y-coordinate data.

signature(x = "Date"))

Create a dot plot for Date x-coordinate data and any (discrete) y-coordinate data.

Note

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

See Also

setPage, boxPlot

Examples

## Not run: 
set.seed(1)
X <- runif(12)
Y <- LETTERS[1:12]
setGD()
dotPlot(X, Y)
# For more details of dotPlot see
vignette(topic="LineScatter", package="smwrGraphs")

## End(Not run)

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