Description Usage Arguments Details Examples
Function for plotting beautiful candle-charts in ggplot
1 2 3 4 |
data |
data frame containing data for plotting |
na.rm |
a logical indicating whether NA values should be stripped before plotting |
title |
character string specifying chart title |
sub.title |
character string specifying chart sub title |
y.title |
character string specifying y-axis title |
x.title |
character string specifying x-axis title |
x.interval |
numeric used to set number of breaks when scaling the x variable |
dc.lines |
character specifying if "both", "none", the "high", or the "low" Donchian channel line should be used |
dc.window |
integer specifying the with of the time window used in the Donchian channel calculation |
output.length |
integer. Specifying the number of output observations |
No further comments...
1 2 3 4 5 | n <- 30
data <- data.frame(open = rnorm(n), high = rnorm(n)+1, low = rnorm(n)-1, close = rnorm(n))
rownames(data) <- Sys.Date() + 1:n
candle_chart(data, na.rm = T, title = "Example of candle-chart - might look funny due to random numbers",
sub.title = NULL, y.title = "prices", dc.lines = "both", base.size = 14, x.interval = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.