[R] 2 plots 1 figure

Meriema Belaidouni meriema at info.univ-angers.fr
Tue Nov 14 17:22:48 CET 2000




In fact my question is more general perhaps this example is better
 x and y are some variables

hist(x)
hist(y)

my question is how one can get both histograms in the same figure so that they can
cross each others.

This command exist under matlab it is hold on.



Torsten Hothorn a écrit:

> On Tue, 14 Nov 2000, Meriema Belaidouni wrote:
>
> > How do you obtain two plots on the same figure?
> > for example
> > plot(rnorm(100)
> > plot(rnorm(100),type="l")
>
> Does
>
> x <- rnorm(100)
> plot(x)
> lines(x)                # or/and ...
> points(x, pch=5)
>
> do what you want?
>
> Torsten
>
> >
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> >

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list