s-news
[Top] [All Lists]

trellis plots question

To: s-news@lists.biostat.wustl.edu
Subject: trellis plots question
From: Dave Evens <devens8765@yahoo.com>
Date: Sun, 11 Mar 2007 08:28:11 -0700 (PDT)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=ft6yK881EI0yTTeTf5vkSkpr/6LUM/4/erIVFXQDGB094G+iZ7t7GZ0rr/7JoVj5veiT/5k8f5nfVHsmWZbKaHuBv3To1rpmsswTjLP6vfG0rvd7AsbpIknQLKor+Yl1uunr1FHS68cyh/C91Kmcd36NRoSlSw+AyHsw9XcRQ/8=;
Dear members, 

I would like to produce a multi-histogram plot of some
data such that each sub-plot has a mark in the heading
bar to represent the mean,

For example, I have the following data 

>x <- matrix(c(runif(15), sample(4, 15, T)), 15) 

plot the data 

>histogram(~x[,1]|as.factor(x[,2]), layout=c(2,2)) 

and the means are

>tapply(x[,1], x[,2], mean)

         1        2         3         4 
 0.6384744 0.677662 0.5630317 0.5473149


I want to put this mean data into each sub-plot such
that the top (heading) panel has a mark in the correct
position on the x-axis to represent the mean. Is this
possible?

Many thanks in advance for your help.

Regards,
Dave



 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front

<Prev in Thread] Current Thread [Next in Thread>