Skip to content
Prev 659 / 885 Next

Choice of graphics package

Hi Randal,

To be honest I don't know the lattice theme system at all, so it is
entirely possible that you can easily do things there that are more
complicated in ggplot2. However, it is easy to set theme and scale[1]
defaults in ggplot2, e.g.,

library(ggplot2)

theme_set(theme_bw() +
          theme(rect = element_rect(fill = "gray10")))

scale_discrete <- scale_fill_manual(values = c("orange", "purple",
"pink", "cyan"))

ggplot(mtcars, aes(x = hp, fill = factor(gear))) + geom_bar() +
  theme_bw() +
  scale_fill_manual(values = c("orange", "purple", "pink", "cyan"))


Best,
Ista

[1] In ggplot2 theme elements are distinct from scales, and AFAIK they
have to be set separately.
On Fri, Nov 27, 2015 at 6:24 PM, Randall Pruim <rpruim at calvin.edu> wrote: