0

I have two time series data, and one goes higher than other for a certain period and then reverses the order in another period. Can I use geom_ribbon to fill the gap between two lines and then use different color (e.g. gray if ts2 > ts1 and pink if ts2 < ts1)?

it appears to me that ggplot seems doing implicitly like aes(ymin=pmin(ymin,ymax), ymax=pmax(ymin,ymax)), doesn't care which of two are actually greater.

yosukesabai
  • 6,184
  • 4
  • 30
  • 42
  • I think adding a column indicating which one is greater and setting a colour scale on that variable might help. – sebastian-c Jul 23 '12 at 02:40
  • 4
    You're much more likely to get folks to look at this question if you create a small, [reproducible](http://stackoverflow.com/q/5963269/324364) example that we can run the illustrates what you're attempting. – joran Jul 23 '12 at 03:31

0 Answers0