plot.rawDist: Plot rawDist object

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plot.rawDist.R


Plots a map of rawDist object.


## S3 method for class 'rawDist'
plot(x, ..., = "keep", spot.type = "id",
  spot.size = 2, spot.color = NULL, main.type = "all",
  color.palette = colorRampPalette(c("blue", "cyan", "yellow", "red"), bias =
  1)(100), highlight.gbs = NULL, highlight.col = "red")



rawDist object


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

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 = NULL.


A character argument with three possible levels ("id", "value", and "idvalue") indicating how sample spots should be plotted. Defaults to "id", which plots sample spot numbers within open circles. The size of the circles can be controlled using the spot.size argument. The option "value" results to a sample map where the color of circles is related to a value through assign.value function. The color scale can be set using the color.palette argument, and size of the symbols (pch = 21) and through the spot.size argument. The option "idvalue" combines "id" and "value" leading to a sample map with sample spot numbers.


An integer or a character argument with value "actual" indicating the size (cex) of points. If "actual", the actual size and shape of sample spots will be plotted. In this case, sample spot size information is required. Defaults to 2 meaning that sample spots are plotted as points with pch = 21 and cex = 2.


A vector with equal length to number of spot sequences defining the color of sample spot labels. If NULL (default) a preset set of colors will be used.


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 used for "value" and "idvalue" spot.type options. Passed to colorRampPalette.


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.


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


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. It should be noted that the samplemap (and therefore also the plot.rawDist) function calls for the layout function every time the arguments spot.type = "value" or spot.type = "idvalue" are used. Consequently, the graphics window is divided into two regions that might cause issues when combining sclero plots with other graphics. The users are adviced to consider the graphics window resetting procedure specified in layout examples.

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.


Mikko Vihtakari

See Also

convert.ijdata for converting the coordinate information to spatstat point patterns.

read.ijdata for reading zip files containing ImageJ ROIs.

plot.spotDist for plotting spotDist objects.

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


shell_map <- convert.ijdata(shellspots)

sclero documentation built on May 2, 2019, 2:26 p.m.