s-news
[Top] [All Lists]

Re: Splus graphing

To: "'Dongyuan Xing'" <dyxing2002@yahoo.com>, <s-news@lists.biostat.wustl.edu>
Subject: Re: Splus graphing
From: "Richard Pugh" <rpugh@mango-solutions.com>
Date: Sun, 14 Dec 2003 15:47:51 -0000
Importance: Normal
In-reply-to: <20031212162635.75113.qmail@web21325.mail.yahoo.com>
Organization: Mango Solutions
Reply-to: <Rpugh@mango-solutions.com>

You’ve got many options … you could try …

 

1)                   Using a loop: it’s not that slow.  Depends on number of patients you have …

2)                   Use the apply functions to “apply” graphical output – not my favourite solution with graphics

3)                   Use the trellis graphics, adjusting the layout argument to get 1 per page

 

Example of trellis solution

If Patient is a factor, use “xyplot(Result ~ Time | Patient, data="" class=SpellE>myData, layout=c(1,1))”

Otherwise you may want to use  xyplot(Result ~ Time | factor(Patient), data="" class=SpellE>myData, layout=c(1,1))”

You could also add the line “strip=function(…) strip.default(…, style=1)” to lose the “colour varying” strip behaviour.

Many other arguments to trellis graphics – look in help file for trellis.args for more info.

 

Hope this helps,

Rich.

 

Mango Solutions

Tel : (01628) 418134

Mob : (07967) 808091

 

-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu [mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of Dongyuan Xing
Sent: 12 December 2003 16:27
To: Splus Users Group
Subject: [S] Splus graphing

 

 

I have a bunch of subjects. I want to draw a scatter plot for each of them with one plot per page.  I know in SAS, with a by statement in “proc plot “,  I can easily do it.

 Could somebody please tell me, In Splus, what’s the “by” statement in Plot function?   I know Splus has function to create plot for each subject and put them on one page. But I want the plots to be on separate page.  can I do the plots without for loop?

 Thanks.

 Dong


Do you Yahoo!?
Free Pop-Up Blocker - Get it now

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.514 / Virus Database: 312 - Release Date: 28/08/2003

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