It is based on the "grid system" of plotting (not on the "base system"). Anyway, it can be used without tackle any of the underlying grid concepts. In fact, it is also a self-contained system with a set of functions for:
- producing complete plots;
- controlling the appearance;
- opening/closing devices.
tpl <- xyplot(lat ~ long, data=quakes) # creates a trellis object
print(tpl) # draw it
Now it is possible to modify the trellis object through the update() method, which is an alternative to modifying the original R expression used to create the trellis object.
update(tplot, main="This is a Title\n(write what you prefer)") # insert a title
Note:
- A subtle change: extra space introduced to allow room for adding the new main title.
- this change is not retained: ion order to retain it you should assign to the object
Different devices have different default settings (e.g.: PDF has different settings compared to PNG). The first time that a lattice output is produced the settings are initialized (type ?trellis.device() ).
The graphical appearance of lines type and colors, text fonts etc. are maintained for each device opened (more on next posts). Default settings of Trellis Graphics produced through Lattice are carefully selected in order to maximize the
readability based on principles of human perception.
Bibliography
Murrell. P., R Graphics, 2005 by Chapman and Hall/CRC ( Murrel book web page )
Nessun commento:
Posta un commento