Skip to content
Prev 31776 / 398506 Next

again troubles with lattice

On Thursday 08 May 2003 03:54 am, Wladimir Eremeev wrote:
You have to print the result of xyplot, which does not happen inside another 
function unless you explicitly call print().

This is obviously somewhat confusing because base R graphics does not behave 
this way, and has led to many similar questions on this list. help(xyplot) 
has:

Value:

     An object of class ``trellis''. The `update' method can be used to
     update components of the object and the `print' method (usually
     called by default) will plot it on an appropriate plotting device.


and help(Lattice) has:


Note:

     High level Lattice functions (like `xyplot') are different from
     conventional S graphics functions because they don't actually draw
     anything. Instead, they return an object of class ``trellis''
     which has to be then `print'ed. This often causes confusion when
     the high level functions are called inside another function (most
     often `source') and hence don't produce any output.


Can you suggest any other place in the documentation where explaining this 
would have helped you find it ?

Deepayan