Skip to content
Prev 7185 / 29559 Next

spplot : varying dots for multiple parameters

On Mon, 14 Dec 2009, Servet Ahmet Cizmeli wrote:

            
Dear Servet,

Good, I expect that you will find some more similarities in time. Note 
that many more R functions return structured objects (usually lists with a 
class attribute). Looking at how lm() works:

args(lm)

will tell you a lot about lattice graphics, often a formula argument, a 
data argument, and maybe a grouping argument. If you have a chance to 
visit the R graphics gallery:

http://addictedtor.free.fr/graphiques

or, even better, get hold of Paul Murrell's R Graphics book and/or 
Deepayan Sarkar's Lattice graphics book (see the books links on the R web 
page), you may find it easier to see what corresponds to what. Very often 
the defaults (like empty space) are there for a reason - recall that the 
very similar Trellis graphics were written by Bill Cleveland at Bell Labs 
with John Chambers, the author of the S language and an important core 
contributor to R.
Perhaps, but this might lead to unwanted subsetting too, so it isn't 
obvious.
That is the subsetting problem. You overcome it by setting xlim and ylim 
arguments. The white space comes from dividing the default device up into 
four rectangles, the relative shapes of which most likely do not match the 
shapes of the data bounding boxes. Try changing the shape of the device 
(width and height arguments) if you need more control. Note that 
analytical and presentation graphics should be treated differently, as you 
can "eyeball" many displays without needing to polish to your presentation 
standards. If need be, that can be done afterwards.
See args(xyplot) - from the help page, you see that x is most often a 
formula, say y ~ x.
No, because it is a general method. Use spplot().
Until you have control of the graphic itself, do not worry about 
decorations, they are not important.

Hope this helps,

Roger