ggboxplot | R Documentation |
Plot the box figure beautifully with ggplot.
ggboxplot(data, mapping)
data |
a tibble |
mapping |
the mapping parameter of ggplot |
A box figure by ggplot
names <- c("swan", "bear", "tiger") date <- as.Date("2015-01-01") + days(0:179) mu <- c(0.2, 0.08, 0.1) sigma <- matrix(c(1, 0.25, -0.3, 0.25, 0.25, 0, -0.3, 0, 0.36), 3, 3) allret <- rMvReturnSim(names, date, mu, sigma) totret <- StackRet(allret, date) ggboxplot(totret, aes(x = stock, y = ret))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.