2

I want to make a graph showing in histogram a quantity and in lines the cumulative quantity, per date. I manage to do it like this :

ggplot(data=data,aes(x=date,group=group)) +
  geom_histogram(aes(y=nb,fill=group),stat="identity",position="dodge")+ 
  geom_line(aes(y=cum.nb,colour=group))

Problem is : I want a different scale for the cumulated data than for the quantity, otherwise my bar are too small to be of interest.

Henri
  • 21
  • 2
  • 2
    Have you looked at http://stackoverflow.com/questions/26727741/how-to-show-a-legend-on-dual-y-axis-ggplot – lawyeR May 22 '15 at 12:29
  • 1
    I think [**this**](http://stackoverflow.com/questions/3099219/how-to-use-ggplot2-make-plot-with-2-y-axes-one-y-axis-on-the-left-and-another) might be the canonical dupe (also pointing to [Kohske's dual axis](http://rpubs.com/kohske/dual_axis_in_ggplot2) in a deleted answer). – Henrik May 22 '15 at 12:57

0 Answers0