[R-SIG-Finance] Quantmod ChartThemes

Joshua Ulrich josh.m.ulrich at gmail.com
Tue May 3 03:06:37 CEST 2011


On Thu, Apr 28, 2011 at 2:22 AM, Costas Vorlow <costas.vorlow at gmail.com> wrote:
> I am having trouble with selecting themes in quantmod
>
> getSymbols("GS")
>  chartSeries(GS, theme=chartTheme('white.mono'),type="line")
>
> How many themes (predefined) exist?
>
Use the source! ;-)

> chartTheme
function (theme = "black", ...)
{
    ctheme <- get(".chart.theme", as.environment("package:quantmod"))
    attr(ctheme, ".Environment") <- NULL
    current.theme <- ctheme[[theme]]
    ll <- list(...)
    for (i in names(ll)) {
        current.theme[[i]] <- ll[[i]]
    }
    return(structure(current.theme, class = "chart.theme"))
}
<environment: namespace:quantmod>
> names(quantmod:::.chart.theme)
[1] "white"      "white.mono" "black"      "black.mono" "beige"
[6] "wsj"


> Best,
> Costas
>

Hope that helps,
--
Joshua Ulrich  |  FOSS Trading: www.fosstrading.com



More information about the R-SIG-Finance mailing list