title: Moving legend in ggplot geom_line is not working
body: <p>I'm trying to move the legend in my ggplot but general commands like <code>guides</code>and <code>legend.position</code> are not working.</p>
  
  <p>This is my code:</p>
  
  <pre><code>sum_CH$`Biogeographic Regions`&lt;-factor(sum_CH$`Biogeographic Regions`, levels=c("Jura", "Midland", "North", "East", "South", "West","Swiss"), #changing legend order
                    labels=c("1", "2", "3", "4", 
                             "5", "6", "7"))         #changing legend names
  
  
  require(ggplot2)
  
  
  p2&lt;-ggplot(data=sum_CH, aes(x=sum_CH$Day, y=sum_CH$value, group=`Biogeographic Regions`))+geom_line(aes(linetype=`Biogeographic Regions`, color=`Biogeographic Regions`), size=1.1)+
      xlab("")+
      ylab(expression(atop(paste("%"))))+
      ggtitle(expression(atop(paste("XXXX"), paste("XX"))))+
      scale_x_discrete(sum_CH$Month, breaks=c(15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345), labels=month.abb)+    #adding months to x axis
      scale_color_manual(values = c("#FFCCCC", "#8ACC66", "#C7EEFC", "#00A9E6", "#BED2FF", "#0070FF", "Black"))+   #changing line color
      scale_linetype_manual(values = c (1,1,1,1,1,1,4))+      #changing line type
      geom_vline(xintercept=c(150,270), colour="grey", linetype="longdash")+
      theme_bw()+
      theme(axis.title.y=element_text(size=rel(1)))+
      theme(axis.title.x=element_text(size=rel(1)))+
      theme(axis.text.x = element_text(size=11, color="black"))+
      theme(axis.text.y = element_text(size=13,color="black"))+
      theme_classic()+
      theme(axis.title.x=element_blank())
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IbWae.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IbWae.jpg" alt="enter image description here"></a></p>