Search code examples
rsymbolsaxis-labels

How to add an interpunct to an x axis label


I have been trying to format this axis for a graph using this line of code:

xlab= bquote('Titratable Acidity'~(g•L^-1))

although I continually receive an error with the "•" symbol cannot be added. I have also tried the following unicode as well with a similar error:

xlab= bquote('Titratable Acidity'~(g"\U00B7"L^-1))

Could anyone tell me how to get the "•" symbol in my x-axis?


Solution

  • Does this work for you?

    plot(0,0, xlab = expression(Titratable~Acidity~(g*"\U00B7"*L^-1)))
    

    enter image description here


    Or,

    plot(0,0, xlab = expression(Titratable~Acidity~(g*"\U2022"*L^-1)))
    

    enter image description here