s-news
[Top] [All Lists]

Re: Plotting Spline within a script

To: S-News <s-news@lists.biostat.wustl.edu>
Subject: Re: Plotting Spline within a script
From: Thom Burnett <Thom.Burnett@cognigencorp.com>
Date: Wed, 27 Apr 2005 10:06:09 -0400
In-reply-to: <6932FDFF711BD411B23900508BC278D50BD3AB7D@cbsw36.fr1.grs.net>
References: <6932FDFF711BD411B23900508BC278D50BD3AB7D@cbsw36.fr1.grs.net>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
Vincent,

Thanks for you help.

I'm using the graphsheet in windows and don't know how to combine your code with a graphsheet. From what I've read graphsheets use the methods guiCreate() guiPlot(), guiModify(). I'm not sure how the
standard graphics or the trellis graphics can be made to fit in.

Thom

vincent.duval@fr.netgrs.com wrote:

Tom, Here is two scripts that I usually use to plot my data and should do what you want. The two panel functions correspond to the smooth unction and the loess function in the programmer's guide. They have many other options in it.
        xyplot(Beta~Alpha,              # plot Beta vs Alpha
                data=dataset,           # The dataset where x and y are
                panel=function(x,y,...){
                        panel.smooth(x,y,...)
                        })

        xyplot(Beta~Alpha,
                data=dataset,
                panel=function(x,y,...){
                        panel.xyplot(x,y,...)
                        panel.loess(x,y,...)
                        })

I hope this can help you,
Vincent
                                               .


VD >-----Original Message-----
VD >From: Thom Burnett [mailto:Thom.Burnett@cognigencorp.com]
VD >Sent: Wednesday, April 27, 2005 2:27 PM
VD >To: S-News
VD >Subject: [S] Plotting Spline within a script
VD >
VD >
VD >How do I add a spline line to an existing scatterplot VD >within a script.
VD >
VD >My script uses guiCreate() to correctly make my "LinePlot" on the VD >graphsheet.
VD >I then need to add a spline curve of the same data.
VD >
VD >There's a parameter to guiCreate of Line Plot called VD >"SmoothingType" VD >which accepts "Spline" sounds like what I want but the line doesn't VD >appear on my graph.
VD >
VD >Is there another argument that turns on the Smoothing Type?
VD >
VD >I also tried creating a Spline with guiPlot() but was VD >unable to get that VD >to show up on my existing and named graphsheet.
VD >
VD >Any help would be appreciated. Examples are probably best.
VD >
VD >Thom
VD >--------------------------------------------------------------------
VD >This message was distributed by s-news@lists.biostat.wustl.edu.  To
VD >unsubscribe send e-mail to VD >s-news-request@lists.biostat.wustl.edu with
VD >the BODY of the message:  unsubscribe s-news
VD >

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