I am working with a data frame like this:df is thisDate Variable Value1/1/2001 a 101/1/2001 b 1001/1/2001 c 501/2/2001 a 151/2/2001 b 901/2/2001 c 60etcI like to draw a stack bar chart which I can with this:ggplot(df, aes(x = Date, y = Value, fill= Variable)) + geom_bar(stat = "identity", position = "stack")+theme_bw()I like to be able to add a trend to this stacked bar chart based on the total values by date. For example, total data fram would look like this:totalDate Value1/1/2001 1601/2/2001 175etcHow can I a trend line using ggplot? Thanks for your help.
| From: | gsaray101 <gsara...@gmail.com> |
| To: | ggp...@googlegroups.com |
| Date: | 06/26/2012 04:49 PM |
| Subject: | Re: adding a trend line to ggplot2 |
| Sent by: | ggp...@googlegroups.com |
--
You received this message because you are subscribed to the ggplot2 mailing
list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2