On Tuesday 21 September 2004 08:41, Edzer Pebesma wrote: > Jacques, please try the following: > > z=factor(c('a', 'b','c')) > > z > > [1] a b c > Levels: a b c > > > x = c(1,2,3) > > y = c(3,2,1) > > xyplot(y~x,groups=z,auto.key=T,asp=diff(range(y))/diff(range(x))) > > the asp argument takes care of one unit in x being equal to one unit > in y.
FWIW, In R 2.0.0 (currently beta), you can also do this with aspect="iso". > If you add e.g. pch=z to vary symbols, auto.key will have to be > replaced by the more complex key argument, see ?xyplot An alternative would be to change the settings (which is the only way the panel function and auto.key can share information). Temporary changes in settings can be attached to a trellis object as follows: xyplot(y~x,groups=z,auto.key=T,asp=diff(range(y))/diff(range(x)), par.settings = list(superpose.symbol = list(cex = 2, pch = levels(z)))) Deepayan ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html