autoplot.density: Autoplot 'stats::density'

Description Usage Arguments Value Examples

Description

Autoplot stats::density

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'density'
autoplot(
  object,
  p = NULL,
  colour = "#000000",
  linetype = NULL,
  fill = NULL,
  alpha = NULL,
  xlim = c(NA, NA),
  ylim = c(NA, NA),
  log = "",
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  asp = NULL,
  ...
)

Arguments

object

stats::density instance

p

ggplot2::ggplot instance to plot

colour

Line colour

linetype

Line type

fill

Fill colour

alpha

Alpha

xlim

limits for x axis

ylim

limits for y axis

log

which variables to log transform ("x", "y", or "xy")

main

character vector or expression for plot title

xlab

character vector or expression for x axis label

ylab

character vector or expression for y axis label

asp

the y/x aspect ratio

...

other arguments passed to PDC/CDF func

Value

ggplot

Examples

1
2
autoplot(stats::density(stats::rnorm(1:50)))
autoplot(stats::density(stats::rnorm(1:50)), fill = 'blue')

Example output

Loading required package: ggplot2

ggfortify documentation built on July 8, 2021, 1:07 a.m.