##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (text, fill, cex)
{
dp <- getClass("Legend")@prototype@dp
if (!missing(cex))
setPar(dp, "cex", cex)
if (!missing(fill))
setPar(dp, "color", fill)
new("Legend", legend = text, dp = dp)
}
Run the code above in your browser using DataLab