Search code examples
rggplot2expressionaxis-labels

R expression can't be shown Mac book


I am trying to plot a graph with the following expression in the x or y label: e.g.

qplot(x=rnorm(20), y=rnorm(20))+ 
  ylab("Per mil--> [\u2030]")+ #this works for me
  xlab(expression(paste(delta,""^"13","C [\u2030]"))) #this doesn't work on my Mac and shows: d13C [ U+2030>], where d13C is correctly shown, but the sign for per mil not; on Windows this expression was working

I hope you can help me. Thanks!


Solution

  • Does this work?

    qplot(x=rnorm(20), y=rnorm(20)) + 
      ylab("Per mil--> [\u2030]") + 
      xlab("\u03B4\u00B9\u00B3C [\u2030]")
    

    enter image description here