Skip to content

Adding Text to a Plot

3 messages · Canto Casasola, Vicente David, David Winsemius, Peter Ehlers

#
On May 22, 2012, at 9:10 AM, Canto Casasola, Vicente David wrote:
# To do  .... what? I see that you over-plotted the R, presumably  
because you did not like the way that:
   bquote(hat(R)^2 == .(summary(lm1)$adj.r.squared))

... ended up looking (with the exponent higher than in the non-hatted  
version.)
Are you sure? It "looks"  to me that the lower "R" is slightly shifted  
to the left, but when I actually measure it, there does not appear to  
be a shift. If it is real and not just an optical illusion, this may  
have something to do with your unstated version of R or your also  
unstated OS.

--
David Winsemius, MD
West Hartford, CT
#
On 2012-05-22 07:51, David Winsemius wrote:
I don't see any shift either (Windows), easily checked with insert of an 
appropriate vertical line, but I would recommend not
overwriting the 'R' by using the phantom() construct:

   text(x=placex, y=placey2,
     bquote(phantom(R)^2 == .(summary(lm1)$adj.r.squared)), adj=c(0,0))
   text(x=placex, y=placey2,
     expression(hat(R)), adj=c(0,0))


Peter Ehlers