Graphics Reference
In-Depth Information
Figure 6-34. Marginal rug added to a scatter plot
NOTE
We used
geom="raster"
in the first of the preceding examples and
geom="tile"
in the second. The
main difference is that the raster geom renders more efficiently than the tile geom. In theory they should
appear the same, but in practice they often do not. If you are writing to a PDF file, the appearance de-
pends on the PDF viewer. On some viewers, when
tile
is used there may be faint lines between the
tiles, and when
raster
is used the edges of the tiles may appear blurry (although it doesn't matter in
this particular case).
As with the one-dimensional density estimate, you can control the bandwidth of the estimate. To
do this, pass a vector for the xand ybandwidths to
h
. This argument gets passed on to the func-