Skip to content
Prev 206543 / 398503 Next

Lattice: How to color the data points in splom() according to the panel they are plotted?

On Sat, Jan 16, 2010 at 11:56 PM, Peter Ehlers <ehlers at ucalgary.ca> wrote:
Thanks, I was going to say the same thing, except that it would be
conceptually simpler just to add the 'i' and 'j' values as arguments
to the "panel" function (the 'pargs' variable). The colors could then
be passed through as part of the ... arguments, and the relevant entry
extracted in the panel function.

The other option is to keep a global counter and increment it inside
the panel function, and choosing colors based on that counter and
knowledge of the order in which panels are drawn. Not very elegant,
but the least intrusive solution I can think of.

-Deepayan