0

On this sample plot

plot(1:10)

I would like to place three separate lines in the bottom right area:

slope=xx
P=yy
R^2=zz

With a superscript ‘2’ in R^2. I’ve tried a few things using text and bquote, but I can’t get it all to work. Does anyone know how to do this?

Erica
  • 125
  • 1
  • 2
  • 9
  • http://stackoverflow.com/questions/11878974/how-to-create-symbol-text-strings-for-plots-in-r ; you might be able to add newline characters `\\n` in the strings to get the bits on separate lines – Ben Bolker Feb 07 '15 at 20:03
  • `plotrix::corner.label()` might be useful – Ben Bolker Feb 07 '15 at 20:04

1 Answers1

1

you can use text():

plot(1:10)
text(8,2,"slope=xx")
text(8,1.5,"P=yy")
text(8,1,expression(R^2== zz)) # you can use expression() for superscripts
xraynaud
  • 2,028
  • 19
  • 29