autoplot.TaskDens: Plot for Density Tasks

View source: R/autoplot.R

autoplot.TaskDensR Documentation

Plot for Density Tasks

Description

Generates plots for TaskDens.

Usage

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

Arguments

object

(TaskDens).

type

(character(1)): Type of the plot. Available choices:

  • "dens": histogram density estimator (default) with ggplot2::geom_histogram().

  • "freq": histogram frequency plot with ggplot2::geom_histogram().

  • "overlay": histogram with overlaid density plot with ggplot2::geom_histogram() and ggplot2::geom_density().

  • "freqpoly": frequency polygon plot with ggplot2::geom_freqpoly.

theme

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

...

(any): Additional arguments, possibly passed down to the underlying plot functions.

Value

ggplot2::ggplot() object.

Examples


library(mlr3)
library(mlr3proba)
library(mlr3viz)
library(ggplot2)
task = tsk("precip")
task$head()

autoplot(task, bins = 15)
autoplot(task, type = "freq", bins = 15)
autoplot(task, type = "overlay", bins = 15)
autoplot(task, type = "freqpoly", bins = 15)


mlr-org/mlr3proba documentation built on April 12, 2025, 4:38 p.m.