s-news
[Top] [All Lists]

Re: Trellis plots

To: "'Dave Evens'" <devens8765@yahoo.com>, <s-news@lists.biostat.wustl.edu>
Subject: Re: Trellis plots
From: <Rich@Mango-Solutions.com>
Date: Tue, 27 Feb 2007 13:44:56 -0000
In-reply-to: <804421.96859.qm@web58307.mail.re3.yahoo.com>
Thread-index: AcdadTdfUxywfODmRGuSHeub2ajVqQAACVVA
Use "as.table=TRUE" within the histogram call ...

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

Rich.

-----Original Message-----
From: Dave Evens [mailto:devens8765@yahoo.com] 
Sent: 27 February 2007 13:43
To: s-news@lists.biostat.wustl.edu
Subject: [S] Trellis plots



Dear members,

I would like to produce a multi-histogram plot of some
data, however I'm having difficults with the order of
the plots on the page.

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

The final plot has factors displayed as

3 4
1 2

on the page rather than

1 2
3 4

How do I did S-Plus to produce the histogram plot in
the correct format?

Thanks in advance.

Regards
Dave




 
____________________________________________________________________________
________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


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