plot.depth: Plot a Depth Object

View source: R/depth_object.R

plot.depthR Documentation

Plot a Depth Object

Description

For d = 2, plots the data with point size proportional to depth and outliers flagged in red. For d > 2, plots a depth profile (observation index vs depth value).

Usage

## S3 method for class 'depth'
plot(x, outlier_threshold = 0.05, main = NULL, ...)

Arguments

x

A depth object from compute_depth().

outlier_threshold

Quantile threshold for flagging outliers. Default 0.05.

main

Plot title. If NULL (default), a sensible title is generated automatically.

...

Additional arguments passed to plot().

Value

Invisibly returns x, the original depth object. Called primarily for its side effect of producing a plot.


depthR documentation built on June 26, 2026, 5:07 p.m.