1

I am asking this question again, my previous question did not get any hit. Maybe I am asking it wrong. This is my data frame:

 

   Date     Server  HardDisk 
1 2010-01-30 server1       100 
2 2010-02-28 Server1       400   
3 2010-03-30 Server1       300 
4 2010-01-30 Server2       200 
5 2010-02-28 Server2       500   
6 2010-03-30 Server2       300 

What I would like to do is create a stack bar based on Server (each server should be stack based on the date). I can easily do this. I also like to ad a linear line using geom_smooth() based on the total values of Date.

I can create the stack chart like this:

ggplot(x, aes(Date, HardDisk) +      geom_bar(aes(fill=Server), stat="identity",  position="stack") +      theme_bw()

How would I go about adding geom_smooth() on top of this stack chart. Geom_smooth() should be based on total values for each date:

Date          Hardisk
2010-01-30     300
2010-02-28     900
2010-03-30     600

any ideas?

Mike Dude
  • 151
  • 2
  • 4
  • 16
  • I'm sorry your original questions didn't get any responses. But asking it again is not considered an appropriate solution. – joran Aug 02 '12 at 15:51
  • I voted to close this question, but added a comment to your original. Please edit the original and I shall take a look. – Andrie Aug 02 '12 at 15:56

0 Answers0