plot.swarmPlot {gmGeostats}R Documentation

Plotting method for swarmPlot objects

Description

Produces a plot for objects obtained by means of swarmPlot(). These are lists of two-element list, respectively giving the (x,y) coordinates of a series of points defining a curve. They are typically obtained out of a DataFrameStack(), and each curve represents a a certain relevant summary of one of the elements of the stack. All parameters of graphics::plot.default() are available, plus the following

Usage

## S3 method for class 'swarmPlot'
plot(
  x,
  type = "l",
  col = "grey",
  xlim = NULL,
  ylim = NULL,
  xlab = "x",
  ylab = "y",
  main = NULL,
  asp = NA,
  sub = NULL,
  log = "",
  ann = par("ann"),
  axes = TRUE,
  frame.plot = axes,
  bg = NA,
  pch = 1,
  cex = 1,
  lty = 1,
  lwd = 1,
  add = FALSE,
  ...
)

Arguments

x

swarmPlot object

type

see graphics::plot.default()

col

color to be used for all curves and points

xlim

limits of the X axis, see graphics::plot.default()

ylim

limits of the Y axis, see graphics::plot.default()

xlab

label for the X axis, see graphics::plot.default()

ylab

label for the Y axis, see graphics::plot.default()

main

main plot title, see graphics::plot.default()

asp

plot aspect ratio, see graphics::plot.default()

sub

plot subtitle, see graphics::plot.default()

log

log scale for any axis? see graphics::plot.default()

ann

plot annotation indications, see graphics::plot.default()

axes

should axes be set? see graphics::plot.default()

frame.plot

should the plot be framed? see graphics::plot.default()

bg

fill color for the data points if certain pch symbols are used

pch

symbol for the data points, see graphics::points()

cex

symbol size for the data points

lty

line style for the curves

lwd

line thickness for the curves

add

logical, add results to an existing plot?

...

further parameters to the plotting function

Value

Nothing. The function is called to make a plot.

Examples

dm = list(point=1:100, var=LETTERS[1:2], rep=paste("r",1:5, sep=""))
ar = array(rnorm(1000), dim=c(100,2,5), dimnames = dm)
dfs = DataFrameStack(ar, stackDim="rep")
rs = swarmPlot(dfs, PLOTFUN=function(x) density(x[,1]), .plotargs=FALSE)
plot(rs, col="yellow", lwd=3)

[Package gmGeostats version 0.11.3 Index]