Thanks Dr. Winsemius. Here's the toy data set. 

Basically pg = var(t^(3))-var(t^(2), gs = var(t^(2))-var(t^(1))    and   ps=var(t^(3))-var(t^(1)). The revised code and the data set is as follows:  

n<-seq(4:13)
pg<-c(-1.241394e-03, -9.738079e-04, -7.158755e-04, -5.343962e-04, -4.088778e-04, -3.202068e-04, -2.558709e-04, -2.079914e-04, -1.715435e-04,
 -1.432430e-04)
gs<-c(0.0022520038, 0.0020060234, 0.0017601434, 0.0015519810, 0.0013810851,0.0012407732, 0.0011245410, 0.0010271681, 0.0009446642, 0.0008740083)
ps<-c( 0.0010106098, 0.0010322155, 0.0010442678, 0.0010175848, 0.0009722074,0.0009205665, 0.0008686700, 0.0008191768, 0.0007731207, 0.0007307653)

plot(n, pg, type="l",xlab="n",ylab="Differences of the variances",ylim=c(-0.0012,0.0023) );
lines(gs,lty = 2)
lines(ps,lty=5)
 
legend(30, 0.0021, expression( c ( var(t^(3))-var(t^(2)), var(t^(2))-var(t^(1))), var("t^(3))-var(t^(1)) ) ), lty=c(1,2,5)).



________________________________
From: David Winsemius <dwinsemius@comcast.net>

Cc: r-help@r-project.org
Sent: Mon, July 5, 2010 9:43:19 PM
Subject: Re: [R] Help in the legend()


On Jul 5, 2010, at 8:06 PM, Shant Ch wrote:

> Hi R-users,
> 
> I was plotting the differences of the variances of the three estimators- T^(1), T^(2), T^(3), ofcourse taking two at a time. I was using the expression() in the legend function in order to show which line correspond to which of the difference, but the following that I had used didn't gave desired result. I would be grateful, if you help me out.
> 
> plot(n, pg, type="l",xlab="n",ylab="Differences of the variances",ylim=c(-0.0012,0.0023), xlim=c(0,60));
> lines(gs,lty = 2)
> lines(ps,lty=5)
> 
> legend(30, 0.0021, expression( c ( var(t^(3))-var(t^(2)), var(t^(2))-var(t^(1))), var("t^(3))-var(t^(1)) ) ), lty=c(1,2,5))
> 

Have you consider offering a toy set of objects which defines "t", "n", and "pg".

> Thanks.
> Shant
> 
> 
> 
>     [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT


      
	[[alternative HTML version deleted]]

