[R] Lattice plots of the form xyplot(y1+y2~x)

Gabor Grothendieck ggrothendieck at gmail.com
Sat Nov 18 03:53:44 CET 2006


Use
   distribute.type = TRUE
or
  panel = panel.superpose.2.
as an argument to xyuplot.  e.g. Using the builtin anscombe data set:

xyplot(y1 + y2 ~ x1, anscombe, type = c("p", "l"), distribute.type = TRUE)

# same
xyplot(y1 + y2 ~ x1, anscombe, type = c("p", "l"), panel = panel.superpose.2)


On 11/17/06, Ross Darnell <r.darnell at uq.edu.au> wrote:
> I would appreciate help trying
> to set different plot types  in a lattice plot with multiple responses e.g.
>
> xyplot(y+fval~x)
>
> but  have "y" as points and "fval" as a line.
>
> I have tried
>
> xyplot(y+fval~x,type=c("p","l"))
>
> but this results in both plots having both types.
>
> Thanks
>
> Ross Darnell
> University of Queensland, AUSTRALIA
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list