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: Martin Maechler (maechler@stat.math.ethz.ch)
Date: Thu 16 Nov 2000 - 00:11:48 EST


Message-ID: <14866.39332.218287.381356@gargle.gargle.HOWL>

>>>>> "Kjetil" == Kjetil Kjernsmo <kjetil.kjernsmo@astro.uio.no> writes:

Kjetil> 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)

Kjetil> I've hacked up something that does this, it's undocumented, not
Kjetil> extensively tested, and is not very elegant, but it works for my
Kjetil> purpose, and I guess it might work for your purpose too. The
Kjetil> easiest way to get it, including my comments, is to look in Roberts
Kjetil> R-devel-archives, here:

        <URL:http://www.ens.gu.edu.au/robertk/R/devel/00b/0024.html>

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

Kjetil, did I forget to tell you that your above "hack" has made it
(after a bit of modification) into
R 1.2 [due on Dec 15] ?

Here is the NEWS entry (under "NEW FEATURES")

    o hist() now returns a "histogram" object and calls the new
        function plot.histogram() for plotting.
        It now also allows character labels.

--

Thanks for your contribution!

Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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