Again how to manage indices and exposants and variable name in plot legend

labNames <- c('xLab','yLab')
par(mar=c(4, 4, 1, 1)+0.4)
scaley <- 100000

xlab <- as.expression(bquote(.(format(scaley, digits = 10, scientific = FALSE, big.mark = " ")) ~ x^2))
ylab <- as.expression(bquote(.(labNames[2]) ~ italic("Here in\" italic")^"-2" * "" [Essai]))
L <- list(x=1:10,  xlab = xlab, ylab = ylab)
do.call(plot, L)

Try it;
You will see how to use a regular R expression with .()
How to put text in exposant with ^
How to paste text with * (no space between) or ~ (adding a space)
How to put text in indice with []
How to stop exposant for next characters with * ""
How to put text in italic with italic()
How to add a " character with \"
How to format large number with format()





Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04