coo_plot: Plots a single shape

Description Usage Arguments Value See Also Examples

View source: R/gr-domesticplotters.R

Description

A simple wrapper around plot for plotting shapes. Widely used in Momocs in other graphical functions, in methods, etc.

Usage

1
2
3
4
5
6
7
8
9
coo_plot(coo, ...)

## Default S3 method:
coo_plot(coo, xlim, ylim, border = "#333333", col = NA,
  lwd = 1, lty = 1, points = FALSE, first.point = TRUE,
  centroid = TRUE, xy.axis = TRUE, pch = 1, cex = 0.5, main = NA,
  poly = TRUE, plot.new = TRUE, plot = TRUE, zoom = 1, ...)

ldk_plot(coo, ...)

Arguments

coo

A list or a matrix of coordinates.

...

further arguments for use in coo_plot methods. See examples.

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.

border

A color for the shape border.

col

A color to fill the shape polygon.

lwd

The lwd for drawing shapes.

lty

The lty for drawing shapes.

points

logical. Whether to display points. If missing and number of points is < 100, then points are plotted.

first.point

logical whether to plot or not the first point.

centroid

logical. Whether to display centroid.

xy.axis

logical. Whether to draw the xy axis.

pch

The pch for points.

cex

The cex for points.

main

character. A title for the plot.

poly

logical whether to use polygon and lines to draw the shape, or just points. In other words, whether the shape should be considered as a configuration of landmarks or not (eg a closed outline).

plot.new

logical whether to plot or not a new frame.

plot

logical whether to plot something or just to create an empty plot.

zoom

a numeric to take your distances.

Value

No returned value.

See Also

Other plotting functions: Ntable, conf_ell, coo_arrows, coo_draw, coo_listpanel, coo_lolli, coo_ruban, ldk_chull, ldk_confell, ldk_contour, ldk_labels, ldk_links, plot_devsegments

Examples

1
2
3
4
5
6
7
8
9
data(bot)
b <- bot[1]
coo_plot(b)
coo_plot(bot[2], plot.new=FALSE) # equivalent to coo_draw(bot[2])
coo_plot(b, zoom=2)
coo_plot(b, border='blue')
coo_plot(b, first.point=FALSE, centroid=FALSE)
coo_plot(b, points=TRUE, pch=20)
coo_plot(b, xy.axis=FALSE, lwd=2, col='#F2F2F2')

Momocs documentation built on Sept. 28, 2017, 9:04 a.m.