Skip to content
Prev 317963 / 398506 Next

ggplot2 customizing a plot

Hi,
On Wed, Feb 20, 2013 at 9:33 AM, Alaios <alaios at yahoo.com> wrote:
I don't think you can easily move the grid to the front, but you can
make the tiles transparent so the grid can be seen through them by
setting the alpha < 1.
use scale_fill_manual
p<- ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value))) +
  labs(x = "MHz", y = "Threshold", fill = "Duty Cycle") +
  geom_raster(alpha=.5) +
  scale_fill_manual(values=c("red", "blue", "green", "purple",
"orange", "pink", "tan", "violet", "yellow"))


Best,
Ista