plot.growthDist: Plot a growthDist object

View source: R/plot.growthDist.R

plot.growthDistR Documentation

Plot a growthDist object

Description

Plots a map of growthDist object.

Usage

## S3 method for class 'growthDist'
plot(
  X,
  ...,
  growth.types = NULL,
  sample.name = "keep",
  main.type = "all",
  color.palette = NULL,
  highlight.gbs = NULL,
  highlight.col = "red"
)

Arguments

X

growthDist object

...

Arguments to be passed to other methods, such as graphical parameters.

growth.types

A character vector specifying the names of growth axes to be plotted. If NULL (default), all growth axes within X will be plotted.

sample.name

A character argument specifying the sample name to be plotted as an overall title for the plot (main). Defaults to "keep" meaning that the sample name will be extracted from the rawDist object. The plot title can be omitted by specifying sample.name = NULL.

main.type

A character argument with four possible levels ("all", "axis", "ends", and "none") indicating how the distance / main axis should be plotted. Defaults to "all" indicating that both the main axis and end points should be plotted. If "axis" only the main axis will be plotted. If "ends" only the end points will be plotted, and if "none" the main axis intormation will not be plotted.

color.palette

Not implemented.

highlight.gbs

A character vector specifying the names of growth bands to be highlighted (i.e. colored with a different color than "darkgrey"). If NULL (default) all growth bands will be drawn using the standard color.

highlight.col

A character argument specifying the color to be used in growth band highlighting (highlight.gbs).

Details

The sclero package currently uses the graphics package distributed with R for plotting (see plot). Plotting sample maps is carried out by the sclero:::samplemap function, which works as an internal function and therefore has not been exported. Users willing to modify sclero plots beyond the flexibility allowed by the plot.rawDist function are instructed to modify the samplemap function, which consists of standard R graphics syntax.

Because the function plots a sample map, the aspect ratio is forced to 1 and cannot be changed. If this causes troubles when trying to set the axis limits (ylim and xlim), try resizing the graphics window.

Author(s)

Mikko Vihtakari

See Also

growth.dist for calculation of growth distances.

plot.default and other methods; points, lines, par.


MikkoVihtakari/sclero documentation built on March 21, 2023, 11:48 a.m.