plot,TrinarizationResult-method {Binarize} R Documentation

## Visualization of trinarization results.

### Description

Visualizes a trinarization as a ray or a two-dimensional plot.

### Usage

## S4 method for signature 'TrinarizationResult,ANY'
plot(x,
twoDimensional=FALSE,
showLegend=TRUE,
showThreshold=TRUE,
...)
## S4 method for signature 'numeric,TrinarizationResult'
plot(x,
y,
showLegend=TRUE,
showThreshold=TRUE,
...)


### Arguments

 x If y is supplied, this is a vector of x coordinates for the trinarization values iny, which are plotted on the y axis. If y is not supplied, this is object of class TrinarizationResult containing the trinarized values to visualize. y If x is a vector of x coordinates, this is object of class TrinarizationResult containing the trinarized values to visualize. twoDimensional Specifies whether the trinarization is depicted as a ray or as a two-dimensional curve (see details). showLegend If set to true, a legend is included in the plot. showThreshold If set to true, the trinarization thresholds are depicted as a horizontal or vertical lines (depending on twoDimensional). ... Further graphical parameters to be passed to plot. The parameters col and pch can be supplied in different ways: If supplied as vectors of size 3, the first value corresponds to a 0 in the trinarization, the second value corresponds to a 1, and the third value corresponds to a 2. col can also have length 4, in which case the fourth entry is the color of the threshold line. If col or pch have the size of the input vector, the corresponding colors and symbols are assigned to the data points.

### Details

The function comprises two different plots: If twoDimensional = TRUE, the positions in the input vector are aligned with the x axis, and the y axis corresponds to the values. The trinarization thresholds are shown as a horizontal lines, and the trinarization is indicated by three different symbols.

If twoDimensional = FALSE, the trinarized values are aligned with a one-dimensional ray, and the separating thresholds are depicted as a vertical lines.

plot, TrinarizationResult

### Examples

# plot a binarization in one and two dimensions
res <- TASC(iris[,"Petal.Length"])
plot(res)
plot(res, twoDimensional = TRUE)
plot(res, twoDimensional = TRUE,
pch = c("x", "+"),
col = c("red", "black", "royalblue", "green"),
lty = 4, lwd = 2)


[Package Binarize version 1.3 Index]