1

I'd like to set the default fill-colour for geom_bin(). I thought

update_stat_defaults("bin", list(colour="red", fill="green"))

should set the fill-colour to green and the boundary to red (such as

ggplot(data, aes(x=x)) + stat_bin(color="red", fill="green")

does).

But

update_stat_defaults("bin", list(colour="red", fill="green"))
ggplot(data, aes(x=x)) + stat_bin()

gives me black bars. Any ideas?

JerryWho
  • 3,060
  • 6
  • 27
  • 49

1 Answers1

1

In ggplot2: How do I set the default fill-colour of geom_bar() in a theme I found the answer

update_geom_defaults("bar",   list(fill = "green", colour="red"))
Community
  • 1
  • 1
JerryWho
  • 3,060
  • 6
  • 27
  • 49