s-news
[Top] [All Lists]

Re: bubbleplot in a panelplot

To: "Karin" <twentestat@yahoo.com>
Subject: Re: bubbleplot in a panelplot
From: "Max Zhao" <mzhao@homer.att.com>
Date: Tue, 12 Jul 2005 10:24:12 -0400
Cc: <s-news@lists.biostat.wustl.edu>
References: <20050712134235.33320.qmail@web32805.mail.mud.yahoo.com>
Karin,
 
You actually do not need any special panel function.  Here is a simple example to do the job. You can make it prettier, but I believe that basically what you want.
 
####################
data_data.frame(x=1:10,y=1:10)
psize_rep(1:5,2)/2
xyplot(y~x, data="">    panel=function(x,y,...) {
        ### put your functions/codes here to do the bubble plot.
        n_length(x)
        for ( i in 1:n ) points(x[i],y[i],cex=psize[i],col=2)
    }
)
 
Actually you can do a lot of general Splus plotting within the trellis framework.  I always draw the vertical bars within xyplot.
 
Hope this helps,
 
Max
 


----- Original Message -----
From: Karin
Sent: Tuesday, July 12, 2005 9:42 AM
Subject: [S] bubbleplot in a panelplot

Hello,
 
I want to make bubbleplots in stead of an ordinary scattor plot  in a panel plot.
Does anyone know how to do this? What kind of panelfunction do I have to take?
 
Thanks in advance,
 
Karin
 


Do you Yahoo!?
Make Yahoo! your home page
<Prev in Thread] Current Thread [Next in Thread>