plot.bsmdata: Plot Method for bsmdata Object

Description Usage Arguments Details Author(s)

Description

A plot method to easily obtain a graphical representation of the data, with several options to enable coding of some variables. For example, hauls can be colour coded, and weighting variables used to control point size.

Usage

1
2
3
4
## S3 method for class 'bsmdata'
plot(x, scale = TRUE, col, pch, legend = FALSE, weight,
  leg.posx = "topleft", leg.posy = NULL, leg.cex = 0.7, leg.bty = "n",
  col.palette = "rainbow", xlim = range(x$length), ...)

Arguments

x

a bsmdata object

scale

logical, if TRUE, the data is scaled by sampling fractions

col

the color of points. This can also be used to colour points by a factor variable such as haul. See details.

pch

the plotting symbol. This can also be the name of a (factor) variable in the data set

legend

logical, if TRUE then a legend is drawn if points are coloured by some variable (eg. haul)

weight

the weights that will decide bubble sizes. Can be a variable or a vector

leg.posx

position of legend. This can be text such as "topleft", "bottomright" etc, or specific x-coordinates

leg.posy

if leg.posx is an x-value, then this is the y-value

leg.cex

size of legend

leg.bty

the box type for the legend. Defaults to "n" for no box

col.palette

the color palette to use by default; can be rainbow or a vector of colors

xlim

range of x-values

...

additional arguments that will be passed to the plot.default function

Details

A lot of the models used are hierarchical, with random effects on hauls. Therefore, to see the variation in hauls graphically, you can pass col = "haul" and the proportions will be coloured differently for each haul.

The same idea is applied to plotting character (pch). To use a different plotting character for each covariate (e.g., mesh size), simply pass pch = mesh into the function. However, note that using pch and col will not be easy to see trends unless they are very clear. It is recommended that you use both symbol and colour only if there are individual points you wish to investigate, rather than for finding trends, which is best done using multiple plots and colour.

Author(s)

Tom Elliott


tmelliott/bsm documentation built on May 31, 2019, 4:38 p.m.