Hi, I'd like to add "alpha" in latex code to my image. Any suggestions? library(UsingR) BagA = c(rep(10,6),rep(20,5), rep(30,4),rep(40,3),rep(50,2),60,70) BagA BagB = c(10, 20,rep(30,2),rep(40,3),rep(50,4),rep(60,5),rep(70,6)) BagB par(mfrow = c(2, 1)) DOTplot(BagA) abline(v=60,lwd=2,lty=2,col="red") text(65,3, "alpha-->", col=2) abline(v=50, lwd=2, lty=2, col="blue") text(57,5, "p-value------->", col="blue") DOTplot(BagB) abline(v=60,lwd=2,lty=2,col="red") text(55,3, "<--beta", col=2) par(mfrow = c(1, 1)) -- View this message in context: http://r.789695.n4.nabble.com/Adding-Latex-to-text-tp4657746.html Sent from the R help mailing list archive at Nabble.com.
Perhaps you want to look at
?plotmath
cheers,
Rolf Turner
On 02/07/2013 11:41 AM, David Arnold wrote:> Hi,
>
> I'd like to add "alpha" in latex code to my image. Any
suggestions?
>
> library(UsingR)
> BagA = c(rep(10,6),rep(20,5), rep(30,4),rep(40,3),rep(50,2),60,70)
> BagA
> BagB = c(10, 20,rep(30,2),rep(40,3),rep(50,4),rep(60,5),rep(70,6))
> BagB
>
> par(mfrow = c(2, 1))
> DOTplot(BagA)
> abline(v=60,lwd=2,lty=2,col="red")
> text(65,3, "alpha-->", col=2)
> abline(v=50, lwd=2, lty=2, col="blue")
> text(57,5, "p-value------->", col="blue")
> DOTplot(BagB)
> abline(v=60,lwd=2,lty=2,col="red")
> text(55,3, "<--beta", col=2)
> par(mfrow = c(1, 1))