r - How to make beta italic and bold in axis label and P italic and bold in text -
x<-c(0.2,0.4,0.8,2.3) y4<-c(190.66,185.55,188.53,187.51) par(mar=c(2.0,4.5,0.5,2.5)) plot(x,y4,type="l",xaxt="n",yaxt="n",col="navy",frame=f,lwd=2, xlab="levels(ppm)",ylab=expression(bold(paste("homa-",beta,"(%)"))),font.lab=2, xlim=c(0,2.5),ylim=c(185,195)) axis(1,at=c(0,0.5,1.0,1.5,2.0,2.5),lwd=2) axis(2,at=c(185,190,195),lwd=2) abline(h=190.66,lty=2) text(2.0,192, "p trend<0.01",cex=0.75)
how make beta italic , bold in axis label , p italic , bold in text? thank you.
from ?plotmath
page
note bold, italic , bolditalic not apply symbols, , hence not greek symbols such mu displayed in symbol font. not apply numeric constants.
also ?plotmath
page
any unicode character can entered text string via \uxxxx escape, or used number in call points. windows family of devices can display such characters if available in font in use. can used display greek letters in bold or italic.
thus can plot beta with
plot(x,y4,type="l",xaxt="n",yaxt="n",col="navy",frame=f,lwd=2, xlab="levels(ppm)",xlim=c(0,2.5),ylim=c(185,195), font.lab=2 , ylab=expression(bold("homa-")~bolditalic("\u03b2")~bold("(%)")) )
and can use expression "p" in text
text(2.0,192, expression(bolditalic(p)~bold("for trend<0.01")),cex=0.75)
Comments
Post a Comment