Re: [R] 2 plots 1 figure

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [R] 2 plots 1 figure
From: Kjetil Kjernsmo (kjetil.kjernsmo@astro.uio.no)
Date: Wed 15 Nov 2000 - 04:19:03 EST


Message-ID: <Pine.OSF.4.30.0011141853150.22777-100000@alnair.uio.no>

On Tue, 14 Nov 2000, Meriema Belaidouni wrote:

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

I've hacked up something that does this, it's undocumented, not
extensively tested, and is not very elegant, but it works for my
purpose, and I guess it might work for your purpose too. The
easiest way to get it, including my comments, is to look in Roberts
R-devel-archives, here:
<URL:http://www.ens.gu.edu.au/robertk/R/devel/00b/0024.html>

After evaluating this code, what you would do to use it is:
hist(x)
lines(hist(y, plot=FALSE))

Best,

Kjetil

-- 
Kjetil Kjernsmo
Graduate astronomy-student                    Problems worthy of attack
University of Oslo, Norway            Prove their worth by hitting back
E-mail: kjetikj@astro.uio.no                                - Piet Hein
Homepage <URL:http://www.astro.uio.no/~kjetikj/>
Webmaster@skepsis.no

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:32 EST