How to change the size of legend text in ggplot2?
<p>I got this plot using the data and code below</p>

<p><a href="https://i.stack.imgur.com/qH3yU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qH3yU.png" alt="enter image description here"></a></p>

<p>I want to be able to change the size of legend text (A, B, M1, ,M3). I tried using </p>

<pre><code>legend.text=element_text(size=0.5)
</code></pre>

<p>but it didn't change. Any suggestion how to reduce the size of legend.text?</p>

<p><strong>Code</strong></p>

<pre><code>ggplot(df.trial1, aes(x=Date, y= A, color="A"))+
      geom_line(linetype=3, size=0.2)+
      geom_point(aes(x=Date, y=B, color="B"), shape = 16, size =1, alpha=0.5)+
      geom_point(aes(x=Date, y=Value, color=Method), size =1, alpha=0.5)+
      scale_colour_manual(name=" ", values=cols,
                      labels=c("A", "B", 'M1', "M2", "M3"))+
      scale_linetype_manual(values = c("dashed")) +
      scale_x_date(breaks = date_breaks("1 month"), labels = date_format("%d-%b-%y"))+
  guides(color=guide_legend(override.aes=list(shape=c(NA,16, 16, 16, 16),
                                          linetype=c(3,0, 0, 0, 0)),
                        direction = "vertical", title.position = "top",
                        label.position="right", label.hjust = 0, label.vjust = 0.5,
                        label.theme = element_text(angle = 0)))+
  labs(x=expression(Date), y=expression(Value))+
  theme(legend.text=element_text(size=0.5))
</code></pre>