[R-sig-Geo] How to obtain name of Map object on graphic device?

Susumu Tanimura stanimura-ngs at umin.ac.jp
Thu Aug 25 11:09:15 CEST 2005


Dear Edzer,

Thank you for advice.

> mplot=function(x) { plot(x); title(deparse(substitute(x))) }

This is, I think, a good example of obtaining an object name. However, an
argument, x, for this function have to be explicit as the name of object,
even though what I want is the unknown name of (Map) object already
plotted on graphic device.

Since some commands like axis() understand an object on graphic device, I
thought there is a commands to get property of graphic device, and maybe
the name of object on graphic device is avaiable.

Anyway, I modified my function that a user have to provide the name of Map
object explicitly, because it is confusing when two or more Map objects
have been plotted. So, I give up to know the name of Map object on graphic
device.

--
Susumu Tanimura




More information about the R-sig-Geo mailing list