autoplot.TaskDens: Plot for Density Tasks

Description Usage Arguments Value Examples

View source: R/TaskDens.R

Description

Generates plots for mlr3proba::TaskDens.

Usage

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

Arguments

object

(mlr3proba::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.

...

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

Value

ggplot2::ggplot() object.

Examples

1
2
3
4
5
6
7
8
9
library(mlr3)
library(mlr3proba)
task = tsk("precip")

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

mlr-org/mlr3viz documentation built on Oct. 13, 2021, 11:43 p.m.