[R] ggplot2: how to combine position=stack and position=dodge in a single graph?

Elena Schulz elena.schulz at gmx.net
Sat Oct 4 23:22:48 CEST 2008

Hi ggplot experts,

I need to plot two time series of stacked data: a barchart with bars for 
each month. To compare the data of two years I need to combine both time 
series with in a single graph via position=doge.
How should I do that?

I tried the following scenario:
I added two layers with the time series of the stacked data for both 
years. That worked well exept the bars are obscuring each other. How can 
  I shift one of the layers to get them displayed next to each other.

Is there an other easier way to achieve this?

Thanks a lot for any help on this.

-- Elena

More information about the R-help mailing list