This function draws the predictions from a random forest algorithm trained on randomly generated categorical data.
canvas_forest(
colors,
n = 1000,
resolution = 500
)
a string or character vector specifying the color(s) used for the artwork.
a positive integer specifying the number of random data points to generate.
resolution of the artwork in pixels per row/column. Increasing the resolution increases the quality of the artwork but also increases the computation time exponentially.
A ggplot
object containing the artwork.
colorPalette
# \donttest{
set.seed(1)
# Simple example
canvas_forest(colors = colorPalette("jungle"))
# }