title: Controlling the legend in ggplot
body: <p>I have composed code that plots the density plots for a certain numeric variable for two Classes using ggplot.  But I can not handle the legend appearance. My code is the following:</p>
  
  <pre><code>mu &lt;- ddply(german, "Class", summarise, grp.mean=mean(Credit_amount))
  
  
  ggplot(german, aes(x=Credit_amount, fill=as.factor(Class))) +
    geom_histogram(aes(y=..density..), position="identity", alpha=0.3)+
    geom_density(alpha=0.6)+
    geom_vline(data=mu, aes(xintercept=grp.mean, color= as.factor(Class)),
               size = 2, alpha = 0.6)+
    labs(title="Credit_amount for the Two Classes (Good and Bad Creditors",x="Credit_amount", y = "Density") +
  scale_fill_manual(limits=c("1", "0"), labels = c("Bad Creditors", "Good Creditors"), values = c("blue", "red"))
  + labs(fill="Class of Customers")
  </code></pre>
  
  <p>The plot is the following. I have annotated the changes I am aiming for:
  <a href="https://i.stack.imgur.com/DP4AJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DP4AJ.png" alt="enter image description here"></a></p>
  
  <p>What I am doing wrong?  What should I do instead?</p>
  
  <p>Your advice will be appreciated.</p>