[R] ggplot2: how to add new names to legend

2014-01-15 Thread Anna Zakrisson Braeunlich
Dear all, I have problems adding new names to the legend (not the legend title). I have tried all sorts of versions involving scale_fill_discrete and themes. Weirdly, my method works fine when changing legend when making a barplot instead. I have searched and tried and am soon throwing the

Re: [R] ggplot2: how to add new names to legend

2014-01-15 Thread Ista Zahn
Hi Anna, You haven't mapped fill to anything. Scales only control how a mapping is translated into a visual property, you have to set the actual mapping as well. What do you want the fill color to indicate? Best, Ista On Wed, Jan 15, 2014 at 3:42 AM, Anna Zakrisson Braeunlich