In the following code, I am able to set two different scales for two facets. Now, I want to format the big scale (e.g. turn it into dollar with scale_y_continuous(labels = dollar)
). How do I format individual facet's scale?
df <- data.frame(value = c(50000, 100000, 4, 3),
variable = c("big", "big", "small", "small"),
x = c(2010, 2011, 2010, 2011))
ggplot(df) + geom_line(aes(x, value)) + facet_wrap(~ variable, scales = "free_y")
A similar question a long time ago about setting individual limit has no answer. I was hoping that ggplot2 2.0 has done something about this.