1

I would like to add superscript into strip text of facet_wrap. First, I used bquote to assemble texts according to this post:

a <- bquote('2007, pop = 5.6 p' ~ m^-2)
b <- bquote('2007, pop = 2.8 p' ~ m^-2)
c <- bquote('2008, pop = 5.6 p' ~ m^-2)
d <- bquote('2009, pop = 5.6 p' ~ m^-2)

and then change names of levels and facet labels according to this post,

levels(df21$trt)<-c(a,b,c,d) 

but the facet labels did not change anything. Any help? Thank you in advance!

Community
  • 1
  • 1
just_rookie
  • 783
  • 10
  • 32
  • The answer from the post could not solve my question, because my facet label is not math formula and facet_wrap_labeller seems to change facet label to math formula. – just_rookie Apr 26 '15 at 00:55
  • I doubt that language objects (such as those produced by bquote) will survive being stuck into factor label attributes. They will almost certainly be coerced to 'character' class. – IRTFM Apr 26 '15 at 15:50
  • I still don't know how to adapt `facet_wrap_labeller` for my situation. Would you please post a short answer? I will accepted it as the best answer. Thank you for advance! – just_rookie Apr 27 '15 at 01:43

0 Answers0