1

I am trying to stack ribbon graph, but am unable to do so. Here is the data:

Here is a link to the data: https://dl.dropboxusercontent.com/u/4961355/Port_of_Santos.csv

Here is the code I am running:

qplot(data = data, x = Date, y = Market.Share, geom = "ribbon", 
    fill = Company, group = Company, ymin = Market.Share - Market.Share/4, 
    ymax = Market.Share + Market.Share/4, alpha = .3)

The resulting graph is rather pretty, but I would really like the resulting graph would stack the ribbons in the end. Also I would like the lines to be a little smoother...

I am tying to get to a graph like this one:

enter image description here

Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
  • Can you explain what you mean by "stack the ribbons in the end"? – jlhoward Nov 18 '14 at 20:29
  • Sure, if you see the graph, the ribbons are stacked in the beginning and the end - they only overlap in the middle. I was hopping to achieve the same thing. – Patrick Klien Nov 19 '14 at 11:22

0 Answers0