You are on page 1of 2

R help archive: [R] legend(): how to put variable in subscript?

http://tolstoy.newcastle.edu.au/R/help/05/05/3733.html

[R] legend(): how to put variable in subscript?


This message: [ Message body ] [ More options ] Related messages: [ Next message ] [ Previous message ] [ Next in thread ] [ Replies ] From: Aleksey Naumov <naumov_at_buffalo.edu> Date: Sun 01 May 2005 - 06:28:24 EST Dear List, I would like to plot a simple legend with two math expressions, e.g. plot(0) legend(1, 0.5, expression(sigma[i], sigma[j])) The difficulty is that i and j should be variables rather than strings "i" and "j". In other words I'd like to do something like: i = "A" j = "B" legend(1, 0.5, expression(sigma[i], sigma[j])) and have "A" and "B" as the actual subscripts. I can substitute the variable in the expression e.g.: legend(1, 0.5, substitute(sigma[i], list(i='A', j='B'))) legend(1, 0.5, bquote(sigma[.(i)])) however, this gives me just one of the two entries in the legend. I cannot figure out how to include both sigmas in the legend. What would be the best way to do something like this? Thank you for your ideas or suggestions. Aleksey
-Aleksey Naumov Department of Geography SUNY-Buffalo ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Received on Sun May 01 10:35:42 2005 This message: [ Message body ] Next message: Jouni Kerman: "[R] eigen() may fail for some symmetric matrices, affects mvrnorm()" Previous message: Spencer Graves: "Re: [R] Test for autocorrelation in nlme model" Next in thread: Peter Dalgaard: "Re: [R] legend(): how to put variable in subscript?" Reply: Peter Dalgaard: "Re: [R] legend(): how to put variable in subscript?" Reply: Peter Dalgaard: "Re: [R] legend(): how to put variable in subscript?" Contemporary messages sorted: [ By Date ] [ By Thread ] [ By Subject ] [ By Author ] [ By messages with attachments ]

1 de 2

10/05/2011 11:39

R help archive: [R] legend(): how to put variable in subscript?

http://tolstoy.newcastle.edu.au/R/help/05/05/3733.html

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:31 EST

2 de 2

10/05/2011 11:39

You might also like