-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathggdistribution.Rd
68 lines (53 loc) · 1.11 KB
/
ggdistribution.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_stats_density.R
\name{ggdistribution}
\alias{ggdistribution}
\title{Plot distribution}
\usage{
ggdistribution(
func,
x,
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{
\item{func}{PDF or CDF function}
\item{x}{Numeric vector to be passed to func}
\item{p}{\code{ggplot2::ggplot} instance to plot}
\item{colour}{Line colour}
\item{linetype}{Line type}
\item{fill}{Fill colour}
\item{alpha}{Alpha}
\item{xlim}{X axis limit}
\item{ylim}{Y axis limit}
\item{log}{log}
\item{main}{main}
\item{xlab}{xlab}
\item{ylab}{ylab}
\item{asp}{asp}
\item{...}{Keywords passed to PDC/CDF func}
}
\value{
ggplot
}
\description{
Plot distribution
}
\examples{
ggdistribution(dnorm, seq(-3, 3, 0.1), mean = 0, sd = 1)
ggdistribution(ppois, seq(0, 30), lambda = 20)
p <- ggdistribution(pchisq, 0:20, df = 7, fill = 'blue')
ggdistribution(pchisq, 0:20, p = p, df = 9, fill = 'red')
}