If one modifies legend by adding a vfont=c("serif", "plain") argument 
to the call to text (which is within the function text2 that is defined 
within legend) then one can do this:

my.slope.1 <-  "  3.22"
my.slope.2 <-  "0.13"
my.inter.1 <-  "-10.66"
my.inter.2 <-  "1.96"
my.Rsqua <-    "0.97"

plot(1:5)

tt <- c("Intercept:", "Slope:", "R\\S2:", 
        paste(my.inter.1, "\\+-", my.inter.2),
        paste(my.slope.2, "\\+-", my.slope.2), my.Rsqua)

# modified legend to accept vfont
my.legend("topleft", legend = tt, ncol = 2, adj = 0.1, vfont =
c("serif", "plain"))

which only requires character manipulation -- no plotmath,
expression or bquote; however, unfortunately it still does
not line up.  It undoubtedly would be possible to fix up
legend so that when used with Hershey fonts everything
lines up as expected.

______________________________________________
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

Reply via email to