Plot a proximity matrix

plotProximity(
  matrix,
  pal = rev(colorspace::sequential_hcl(palette = "Blues 2", n = 100)),
  limit = NULL
)

Arguments

matrix

A matrix of proximities created by the proximityMatrix function

pal

A vector of colours to show proximity scores, for use with scale_fill_gradientn.

limit

Specifies the fit range for the color map for proximity scores.

Value

A plot of proximity values.

Examples

if (FALSE) {
library(ggplot2)
df_trees <- extractTreeData(model = my_model, data = my_data)
mProx <- proximityMatrix(trees = trees_data, reorder = TRUE, normalize = TRUE, iter = 1)
plotProximity(matrix = mProx) +
 ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, size = 5),
 axis.text.y = ggplot2::element_text(size = 5))
}