title: How to use subscripts in ggplot2 legends [R]
body: <p>Can I use subscripts in ggplot2 legends? I see <a href="https://stackoverflow.com/questions/5293715/how-to-use-greek-symbols-in-ggplot2">this question</a> on greek letters in legends and elsewhere, but I can't figure out how to adapt it.</p>
  
  <p>I thought that using <code>expression()</code>, which works in axis labels, would do the trick. But my attempt below fails. Thanks!</p>
  
  <pre><code>library(ggplot2)
  temp &lt;- data.frame(a = rep(1:4, each = 100), b = rnorm(4 * 100), c = 1 + rnorm(4 * 100))
  names(temp)[2:3] &lt;- c("expression(b[1])", "expression(c[1])")
  temp.m &lt;- melt(temp, id.vars = "a")
  ggplot(temp.m, aes(x = value, linetype = variable)) + geom_density() + facet_wrap(~ a)
  </code></pre>