This is in part related to my question yesterday.
So here is the data and a plot created in ggplot2.
df = data.frame(date=c(rep(2008:2013, by=1)),
value=c(303,407,538,696,881,1094))
ggplot(df, aes(date, value, width=0.64)) +
geom_bar(stat = "identity", fill="#336699", colour="black") +
ylim(c(0,1400)) + opts(title="U.S. Smartphone Users") +
opts(axis.text.y=theme_text(family="sans", face="bold")) +
opts(axis.text.x=theme_text(family="sans", face="bold")) +
opts(plot.title = theme_text(size=14, face="bold")) +
xlab("Year") + ylab("Users (in millions)") +
opts(axis.title.x=theme_text(family="sans")) +
opts(axis.title.y=theme_text(family="sans", angle=90)) +
geom_segment(aes(x=2007.6, xend=2013, y=550, yend=1350), arrow=arrow(length=unit(0.4,"cm")))
Is it possible to produce the squigly trend line in the following graph with ggplot2
I had created the plot in R and then made prettied it up in Adobe Photoshop, and I'm wondering if could have produced that squiggly trend line straight in R.
If this can't be done in ggplot2, are there any specific R packages which would be amenable to this task?
I'm not asking about reproducing the graph. That's not an issue. Just producing the trend line seems to be an issue.