autoplot.TaskRegr: Plots for Regression Tasks

View source: R/TaskRegr.R

autoplot.TaskRegrR Documentation

Plots for Regression Tasks

Description

Visualizations for mlr3::TaskRegr. The argument type controls what kind of plot is drawn. Possible choices are:

  • "target" (default): Box plot of the target variable.

  • "pairs": Passes data to GGally::ggpairs(). Color is set to target column.

Usage

## S3 method for class 'TaskRegr'
autoplot(object, type = "target", theme = theme_minimal(), ...)

Arguments

object

(mlr3::TaskRegr).

type

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

theme

(ggplot2::theme())
The ggplot2::theme_minimal() is applied by default to all plots.

...

(ignored).

Value

ggplot2::ggplot().

Examples

if (mlr3misc::require_namespaces("GGally", quietly = TRUE)) {
task = tsk("mtcars")
task$select(c("am", "carb"))

head(fortify(task))
autoplot(task)
autoplot(task, type = "pairs")
}

mlr3viz documentation built on Feb. 22, 2026, 5:08 p.m.