plot_sil {gdi}R Documentation

Plots a silhouette read by measuresil()

Description

Plots a silhouette read by measuresil()

Usage

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

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)

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()

Value

A plotted silhouette

Examples

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

[Package gdi version 1.6.0 Index]