Learn R Programming

gdi (version 1.10.0)

plot_sil: Plots a silhouette read by measuresil()

Description

Plots a silhouette read by measuresil()

Usage

plot_sil(
  sil,
  flip = FALSE,
  add = FALSE,
  expansion = 1,
  xoffset = 0,
  yoffset = 0,
  alpha = 1,
  col = "grey",
  border = "darkgrey",
  scale = 1,
  xlab = "",
  ylab = "",
  ...
)

Value

A plotted silhouette

Arguments

sil

A data frame that is the output of measuresil(..., return="all"), containing the center and the diameter of the silhouette at each value for x.

flip

Logical indicating whether to flip axes (needed if measuresil() was performed using align="v", defaults to FALSE.

add

Logical indicating whether to add silhoutte to an existing plot (defaults to FALSE)

expansion

Numeric containing expansion factor to multiply with body diameters. Defaults to 1 (i.e. no expansion). XXX

xoffset

Optional value by which to shift the silhouette on the x axis

yoffset

Optional value by which to shift the silhouette on the y axis

alpha

Opacity value for fill of polygon (defaults to 1)

col

Fill color of polygon (defaults to "grey")

border

Border color of polygon (defaults to "darkgrey")

scale

Scale to use for plotting (given in pixels/unit). Defaults to 1.

xlab

X axis label to use for plotting (if add=FALSE)

ylab

Y axis label to use for plotting (if add=FALSE)

...

Other parameters to pass on to plot() or lines()

Examples

Run this code
fdir <- system.file(package="gdi")
measuresil(file.path(fdir,"exdata","lat.png"), return="all")->lat_
plot_sil(lat_)

Run the code above in your browser using DataLab