seancarmody / ngramr

R package to query the Google Ngram Viewer
Other
48 stars 9 forks source link

Making ggram accept any geom #3

Closed briatte closed 11 years ago

briatte commented 11 years ago

These changes make ggram accept any ggplot2 geom. The example below uses step.

rplot

ggram(c("cancer", "fumer", "cigarette"),
      year_start = 1900,
      corpus = "fre_2012", 
      geom = "step")

Two examples to illustrate this change have been added to the documentation.

seancarmody commented 11 years ago

OK. Great ideas here. I have incorporated them in a somewhat different way: ... passes options to ngram and there is a new option geom_options that passes any additional options to the geom.

briatte commented 11 years ago

Your implementation makes more sense :)

Just submitted another fix to preserve the case of the keywords in the discrete legend.