jrnold / ggthemes

Additional themes, scales, and geoms for ggplot2
http://jrnold.github.io/ggthemes/
1.31k stars 229 forks source link

Example for theme_fivethirtyeight errors #81

Closed carlganz closed 7 years ago

carlganz commented 7 years ago

From docs:

library(ggthemes)
p <- ggplot(mtcars) +
     geom_point(aes(x = wt, y = mpg, colour=factor(gear))) +
     facet_wrap(~am) +
     geom_smooth(method = "lm", se = FALSE) +
     scale_color_fivethirtyeight() +
     theme_fivethirtyeight()

p

Gives error

I suspect the aes should be inside the ggplot instead of the geom, but perhaps I am being naive.

Regards

jrnold commented 7 years ago

Thanks! You were right. It's fixed in the development version now.