seancarmody/ngramr — pull request #9 by briatte (2013-07-20 11:01:04+00:00)
Title: fix labels

The discrete scale needs labels to be manually set to preserve upper case in the keywords. Here's an example:

ggram(c("USSR", "Russia"),
year_start = 1900,
corpus = "eng_gb_2012",
geom = "area",
geom_options = list(position = "stack"),
ignore.case = TRUE) +
aes_string(fill = "Phrase") +
scale_x_continuous(breaks = 1900 + 10*0:11) +
scale_fill_discrete("", labels = c("USSR", "Russia"))

![](http://i.imgur.com/ALCfdrs.png)