Skip to content
Prev 169066 / 398506 Next

color and fontfamily in lattice

Try this:

dados <- data.frame(varsep = factor(rep(1:2,10)),
                    i = runif(20))

library(lattice)
font.settings <- list(
         font = 2,
         cex = 2,
         fontfamily = "serif")
my.theme <- list(
         box.umbrella = list(col = "red"),
         box.rectangle = list(col = "purple"),
         box.dot = list(col = "blue", pch = 15),
         par.xlab.text = font.settings,
         par.ylab.text = font.settings,
         axis.text = font.settings)
bwplot(varsep ~ i, dados,
       xlab = names(dados)[1],
       ylab = names(dados)[2],
       panel = function(...) {
       	 panel.grid(v = -1, h = 0)
       	 panel.bwplot(...)
       },
       par.settings = my.theme)

Type "trellis.par.get()" at the R command line to see other parameters
you can change. To change the settings on all plots, you can remove
the "par.settings" from the call to "bwplot" and simply use:

trellis.par.set(theme = my.theme)

HTH,

--sundar


2009/2/3 Leandro Marino <leandro at cesgranrio.org.br>:
Message-ID: <c9ce82b00902030645t7a2afba6r5bb550f8f4ed425e@mail.gmail.com>
In-Reply-To: <!&!AAAAAAAAAAAYAAAAAAAAAEadxqYXQLlLmuUnwe+aKQfCgAAAEAAAAOAIZM8lHIxAqzHMWd6BUE0BAAAAAA==@cesgranrio.org.br>