autoplot.TaskClust: Plot for Clustering Tasks

View source: R/TaskClust.R

autoplot.TaskClustR Documentation

Plot for Clustering Tasks

Description

Generates plots for mlr3cluster::TaskClust, depending on argument type:

  • "pairs": Passes data and additional arguments down to GGally::ggpairs() (default).

Usage

## S3 method for class 'TaskClust'
autoplot(object, type = "pairs", ...)

Arguments

object

(mlr3cluster::TaskClust).

type

(character(1)):
Type of the plot. See description.

...

(any): Additional argument, passed down to the underlying geom or plot functions.

Value

ggplot2::ggplot() object.

Theme

The theme_mlr3() and viridis color maps are applied by default to all autoplot() methods. To change this behavior set options(mlr3.theme = FALSE).

Examples

if (requireNamespace("mlr3")) {
  library(mlr3)
  library(mlr3cluster)
  library(mlr3viz)

  task = mlr_tasks$get("usarrests")

  head(fortify(task))
  autoplot(task)
}

mlr3viz documentation built on Aug. 15, 2022, 5:07 p.m.