Skip to content
Prev 33384 / 398513 Next

extension to plot.formula?

Adrian Baddeley wrote:
Trellis - er - lattice graphics uses a similar approach, but you use 
'+', and give another argument, allow.multiple:

xyplot(y1+y2~x,data=xyy,allow.multiple=T)

  I'm no great user of lattice graphics, so I leave it to someone else 
to tell us how to join the dots with lines.

  The cbind() approach has a precedent in glm(cbind(y,n)~x,family=binomial)

  Although I've always found plotting with formulas a bit ugly, since 
the 'x' and 'y' are in reverse alphabetic order and I could be plotting 
things that conceptually have no formulaic relationship - x and y 
geographic coordinates, for instance. In a modelling context you can 
read the ~ as 'depends on', but not necessarily in a plot!

Baz