Skip to content
Prev 78364 / 398502 Next

grob questions

On 10/4/05, Paul Murrell <p.murrell at auckland.ac.nz> wrote:
Just one clarification.  What is the scope of names?
In a recent post

  https://www.stat.math.ethz.ch/pipermail/r-help/2005-October/078653.html
  https://www.stat.math.ethz.ch/pipermail/r-help/2005-October/078656.html

it seems that one had to use absolute paths and that seems to be the
case here too where as mkondrin pointed out earlier in this thread

  https://www.stat.math.ethz.ch/pipermail/r-help/2005-October/078635.html

that get.grid("myplot::xaxis::labels")$label works.

Its not clear to me whether names:

- must be in absolute paths
- can be relative to some position under some conditions
- are global across all grob names in use and can be referred to directly
as long as they are unique among all grobs defined so far.

It seems absolute path names work but I am not sure whether the
other possibilities can work under some conditions too.

Also what the scope of viewports?   Absolute path? Relative path?
Global names?  Does it work the same way?  I think at least
absolute and relative paths are avalable here but could you confirm
my understanding and whether the situation is the same for
viewports and grobs?

(In the Windows, and analogously in UNIX, file system one can write
\usr\myname or position oneself to \usr using cd and then refer to
myname in a relative way:

cd \usr
dir myname
)

Thanks.