Learn R Programming

Momocs (version 0.1-03)

Utilities: coo.plot: Plots sets of shapes.

Description

coo.plot is a simple wrapper for plotting shapes. It basically tunes plot standard function to display single shapes as polygons, within a standardised plotting area. coo.draw simply adds a shape on the active plot. coo.list.panel plots a list of shapes.

Usage

coo.plot(coo=NA, col="#70809033",
		border="#708090EE", xlim=c(-1, 1), ylim=c(-1, 1), points=TRUE, first.point=TRUE,
		points.col=border, pch=20, cex=0.25, main, ...)

coo.draw(coo = NA, col = "#70809033",
		border = "#708090EE", points = TRUE, first.point=TRUE,
		points.col = border, pch = 20, cex = 0.25,  ...)

coo.list.panel(coo.list, dim,
		byrow = TRUE, fromtop = TRUE,
		mar = rep(0, 4), cols, borders, density = NULL, angle = 45)

Arguments

coo
A list or a matrix of coordinates.
col
A color to fill the shape polygon.
border
A color for the shape border.
xlim
If coo.plot is called and coo is missing, then a vector of length 2 specifying the ylim of the ploting area.
ylim
If coo.plot is called and coo is missing, then a vector of length 2 specifying the ylim of the ploting area.
points
logical. Whether to display points. If missing and number of points is < 100, then points are plotted.
first.point
logical. Whether to display the first point.
points.col
The color for plotting points.
pch
The pch for points.
cex
The cex for points.
main
character. A title for the plot.
...
Additional parameters for drawing the first point.
coo.list
A list of coordinates, such as those in the @coo slot of Coo objects.
dim
A vector of the form (nb.row, nb.cols) to specify the panel display. If missing, shapes are arranged in a square.
byrow
logical. Whether to succesive shape by row or by col.
fromtop
logical. Whether to display shapes from the top of the plotting region.
mar
A vector to define margins.
cols
A vector of colors to fill shapes.
borders
A vector of colors to draw shape borders.
density
A vector for density of shading lines. See polygon
angle
A vector for shading lines.

Examples

Run this code
data(bot)
coo.plot(bot@coo[[1]])
coo.list.panel(bot@coo)

Run the code above in your browser using DataLab