title: r label plots with fractions
body: <p>I would like to create 3 plots each containing a plot of 2 lines from different data frames, and then label each plot with a specific fraction. </p>
  
  <p>So for example I have the 3 data frames:</p>
  
  <pre><code>df1 &lt;- data.frame(x=c(1,2,3,4),y=c(2,3,4,5), z=c(3,3,6,8))
  df2 &lt;- data.frame(x=c(3,4,5,6),y=c(1,3,6,7), z=c(2,4,4,8))
  df3 &lt;- data.frame(x=c(1,2,2,3),y=c(2,5,6,9), z=c(2,5,6,7))
  </code></pre>
  
  <p>And I would like to:</p>
  
  <p>1) Create 3 different plots for each data frame, each with one red and one blue line; </p>
  
  <p>2) Add an annotation over the blue line of each plot using a different fraction for each plot.</p>
  
  <p>For example the plot for data frame 1 is something like this:</p>
  
  <pre><code>p1 &lt;- ggplot(data = df1) + geom_line(aes(x=x,y=y, colour="blue")) + geom_line(aes(x=x,y=z, colour="red")) +  scale_colour_manual(name="data", values=c("red", "blue"))
  </code></pre>
  
  <p>Then to add the labels over the blue line I have tried:</p>
  
  <pre><code>p1 + geom_text(aes(x=df1$x[which.max(df1$y)]+1, y = max(df1$y)+4,  label = "{\frac{23 22 22}{44 28 32}}", size=2, parse=TRUE))
  </code></pre>
  
  <p>But this does not work, and I have searched so many hours and cannot find how to use fractions (and brackets enclosing the fraction) in the annotations. Any help is deeply appreciated!</p>
  
  <p>-fra</p>