title: How to set expressions as axis text of facets in ggplot2?
body: <p>I am trying to set expressions as x-axis text in facet environment in <code>ggplot2</code> with unequal length of labels. For example:</p>
  
  <pre><code>dat &lt;- structure(list(Species = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 
  2L, 2L, 2L), .Label = c("A", "B"), class = "factor"), Individual = structure(c(1L, 
  2L, 3L, 5L, 1L, 2L, 3L, 4L, 5L), .Label = c("1", "2", "3", "4", 
  "expression(bar(\"x\"))"), class = "factor"), mean = c(45, 32, 
  100, 59, 65, 110, 87, 93, 88.75), min = c(34, 20, 89, 47.66666667, 
  54, 100, 67, 85, 76.5), max = c(54, 42, 110, 68.66666667, 76, 
  120, 99, 105, 100)), .Names = c("Species", "Individual", "mean", 
  "min", "max"), class = "data.frame", row.names = c(NA, -9L))
  
  require(ggplot2)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/L5bbm.png" alt="enter image description here"></p>
  
  <p><a href="https://stackoverflow.com/questions/6202667/how-to-use-subscripts-in-ggplot2-legends-r">This answer</a> describes how to do it without facets. I manage set the <code>labels</code>, but I cannot find how to set labels for each facet separately:</p>
  
  <pre><code>ggplot(dat, aes(x = Individual, y = mean, ymin = min, ymax = max, color = Species)) + 
    geom_pointrange() + 
    facet_wrap(~Species, scales = "free") + 
    scale_x_discrete(labels = c("1", "2", "3", expression(bar("x")))) + 
    theme_grey(base_size = 18)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xbA1O.png" alt="enter image description here"></p>
  
  <p>A long vector or a list specifying <code>labels</code> does not seem to work:</p>
  
  <pre><code>ggplot(dat, aes(x = Individual, y = mean, ymin = min, ymax = max, color = Species)) + 
    geom_pointrange() + 
    facet_wrap(~Species, scales = "free") + 
    scale_x_discrete(labels = c("1", "2", "3", expression(bar("x")), "1", "2", "3", "4", expression(bar("x")))) +
    theme_grey(base_size = 18)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/1ryvl.png" alt="enter image description here"></p>
  
  <pre><code>ggplot(dat, aes(x = Individual, y = mean, ymin = min, ymax = max, color = Species)) + 
    geom_pointrange() + 
    facet_wrap(~Species, scales = "free") + 
    scale_x_discrete(labels = list(c("1", "2", "3", expression(bar("x")), c("1", "2", "3", "4", expression(bar("x")))))) + 
    theme_grey(base_size = 18)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/wyA8l.png" alt="enter image description here"></p>
  
  <p>Is there a way doing this in <code>ggplot2</code>?</p>