Skip to content
Back to formatted view

Raw Message

Message-ID: <20021112122248.GA18254@pcf004.jinr.ru>
Date: 2002-11-12T12:22:49Z
From: Timur Elzhov
Subject: problem with `legend' + `substitute'

Hello, R experts!

I'd like to add the somewhat complicated expression as "legend"
to the plot:

  x  <-  1
  T  <- 10

  plot(x)
  legend   ( 1.0 ,1.0
            ,substitute ( paste ( Sr["2"] ,GaMnO["5.541"]
                                 ,", T = " ,T ,"K"
                                )
                         ,list (T = T)
                        )
            ,bg = "white"
            ,xjust = 0.5
            ,yjust = 0.5
           )

So, I get plot with not one, but *six* instances of the desired expression,
one under another!

Ok, trying to use `text' ..

  plot(x)
  text     ( 1.0 ,1.0
            ,substitute ( paste ( Sr["2"] ,GaMnO["5.541"]
                                 ,", T = " ,T ,"K"
                                )
                         ,list (T = T)
                        )
            ,adj = c(0.5, 0.5)
           )

Well, `text' works properly!  but why `legend' behaves so?


(I'm running R v1.6.1 on Debian woody system for i386)

Thanks,
Timur.




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._