Thank you all, I've got everything I need now.

On Mon, Oct 27, 2008 at 2:29 PM, <[EMAIL PROTECTED]> wrote:

> > the example below does not work. (i know it's not supposed, but it makes
> it
> > clear what i'm trying to achieve)
> >
> > par(mfrow=c(2,1))
> > xyplot(y~x2|x1,data=dataframe1,pch=20)
> > xyplot(y~x2|x1,data=dataframe2,pch=20)
> >
> > i know i could probably merge the two datasets and do something like
> > xyplot(y~x2|x1+dataset,data=merged)
>
> par is a base graphics command, and doesn't work with grid/lattice
> graphics.  While it is possible to merge grid and base graphics using for
> example the gridBase package, I suspect what you want is to draw two
> lattice plots on the same figure. For this, you need to read up on
> viewports, and try an example like this:
>
> pushViewport(viewport(layout=grid.layout(2,1)))
> pushViewport(viewport(layout.pos.row=1))
> topplot = xyplot(Sepal.Length ~ Petal.Length | Species, data = iris)
> print(topplot, newpage=FALSE)
> upViewport()
> pushViewport(viewport(layout.pos.row=2))
> bottomplot = xyplot(Sepal.Width ~ Petal.Width | Species, data = iris)
> print(bottomplot, newpage=FALSE)
> popViewport(2)
>
> See also section 5.5 in Paul Murrell's book ('R Graphics').
>
> Regards,
> Richie.
>
> Mathematical Sciences Unit
> HSL
>
>
> ------------------------------------------------------------------------
> ATTENTION:
>
> This message contains privileged and confidential information intended
> for the addressee(s) only. If this message was sent to you in error,
> you must not disseminate, copy or take any action in reliance on it and
> we request that you notify the sender immediately by return email.
>
> Opinions expressed in this message and any attachments are not
> necessarily those held by the Health and Safety Laboratory or any person
> connected with the organisation, save those by whom the opinions were
> expressed.
>
> Please note that any messages sent or received by the Health and Safety
> Laboratory email system may be monitored and stored in an information
> retrieval system.
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
> Scanned by MailMarshal - Marshal's comprehensive email content security
> solution. Download a free evaluation of MailMarshal at www.marshal.com
> ------------------------------------------------------------------------
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to