[R] Legend
S Ellison
S.Ellison at lgc.co.uk
Fri Sep 28 11:52:45 CEST 2007
>>> P Ehlers <ehlers at math.ucalgary.ca> 26/09/2007 11:06:54 >>>
>a <- .33
>b <- .55
>legend("bottom", fill=c("red","blue"),
> legend=c(bquote(p == .(a)), bquote(p == .(b))), bty="n")
paste should do it:
legend("bottom", fill=c("red","blue"),
legend=paste("p=", c(a,b), sep=""), bty="n")
and would be even easier if a and b were already in a vector.
> I have following syntax for putting a legend :
>
> legend("bottom", fill=c("red","blue"), legend=expression(p==0.30, p==0.50), bty="n")
>
> However what I want is that : the value "0.30" should be a value of a variable instead of a constant, so that I can put the name of this variable and in legend it's value will be displayed. Can anyone tell me how to do that?
>
> Regards,
>
>
> thanks in advance
>
> ---------------------------------
> Why delete messages? Unlimited storage is just a click away.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
>
______________________________________________
R-help at 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.
*******************************************************************
This email contains information which may be confidential and/or privileged, and is intended only for the individual(s) or organisation(s) named above. If you are not the intended recipient, then please note that any disclosure, copying, distribution or use of the contents of this email is prohibited. Internet communications are not 100% secure and therefore we ask that you acknowledge this. If you have received this email in error, please notify the sender or contact +44(0)20 8943 7000 or postmaster at lgcforensics.com immediately, and delete this email and any attachments and copies from your system. Thank you.
LGC Limited. Registered in England 2991879.
Registered office: Queens Road, Teddington, Middlesex TW11 0LY, UK
More information about the R-help
mailing list