plot,TrinarizationResult-method {Binarize} | R Documentation |
Visualizes a trinarization as a ray or a two-dimensional plot.
## 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,
...)
x |
If |
y |
If |
twoDimensional |
Specifies whether the trinarization is depicted as a ray or as a two-dimensional curve (see details). |
showLegend |
If set to |
showThreshold |
If set to |
... |
Further graphical parameters to be passed to |
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 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)