~ubuntu-branches/ubuntu/oneiric/latticeextra/oneiric

1.1.5 by Dirk Eddelbuettel
Import upstream version 0.3-1
1
## Construct a custom theme based on supplied colors.  Defaults to
2
## colors from RColorBrewer
3
4
custom.theme <-
5
    function(symbol = brewer.pal(n = 8, name = "Dark2"),
6
             fill = brewer.pal(n = 12, name = "Set3"),
7
             region = brewer.pal(n = 11, name = "Spectral"),
8
             reference = "#e8e8e8",
9
             bg = "transparent",
10
             fg = "black",
11
             ...)
1.3.5 by Dirk Eddelbuettel
Import upstream version 0.6-5
12
{
13
    theme <-
1.1.5 by Dirk Eddelbuettel
Import upstream version 0.3-1
14
        list(plot.polygon      = list(col = fill[1], border = fg[1]),
15
             box.rectangle     = list(col= symbol[1]),
16
             box.umbrella      = list(col= symbol[1]),
17
             dot.line          = list(col = reference),
18
             dot.symbol        = list(col = symbol[1]),
19
             plot.line         = list(col = symbol[1]),
20
             plot.symbol       = list(col= symbol[1]),
21
             regions           = list(col = colorRampPalette(region)(100)),
22
             reference.line    = list(col = reference),
23
             superpose.line    = list(col = symbol),
24
             superpose.symbol  = list(col = symbol),
25
             superpose.polygon = list(col = fill, border = fg),
26
27
             background        = list(col = bg),
28
             add.line          = list(col = fg),
29
             add.text          = list(col = fg),
30
             box.dot           = list(col = fg),
31
             axis.line         = list(col = fg),
32
             axis.text         = list(col = fg),
33
             strip.border      = list(col = fg),
34
             box.3d            = list(col = fg),
35
             par.xlab.text     = list(col = fg),
36
             par.ylab.text     = list(col = fg),
37
             par.zlab.text     = list(col = fg),
38
             par.main.text     = list(col = fg),
39
             par.sub.text      = list(col = fg))
40
    modifyList(modifyList(standard.theme("pdf"), theme), simpleTheme(...))
41
}
1.3.5 by Dirk Eddelbuettel
Import upstream version 0.6-5
42
43
custom.theme.2 <- function(...)
44
{
45
    doit <-
46
        function(symbol = brewer.pal(n = 9, name = "Set1")[c(2:1, 3:5, 7:9)], ## blue first
47
                 fill = brewer.pal(n = 8, name = "Accent"),
48
                 region = brewer.pal(n = 11, name = "RdBu"),
49
                 ...)
50
        {
51
            custom.theme(symbol = symbol, fill = fill, region = region, ...)
52
        }
53
    doit(...)
54
}
55
1.1.5 by Dirk Eddelbuettel
Import upstream version 0.3-1
56