Re: [R] xyplot, type="b"

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Wed 21 Jun 2006 - 13:35:11 EST

Hi

Benjamin Tyner wrote:
> Thanks, but this proposal has the same effect as type="b" in
> panel.xyplot, which as noted in the documentation is the same as
> type="o". To clarify, I don't want type="o" at all; I want there to be
> gaps between the lines and points. Have a look at
>
> plot(y~x,data=dat,type="b")

Is this what you mean ... ?

dat<-data.frame(x=1:10,y=1:10,z=sample(letters[1:3],10,T)) xyplot(y~x | z, data = dat,

       panel = function(x, y, ...) {
         panel.lines(x, y, ...)
         panel.points(x, y, col=trellis.par.get("background")$col,
                      cex=1.5, pch=16, ...)
         panel.points(x, y, ...)
       })

Paul

> ronggui wrote:
>

>>> apropos("^panel")
>> will show you what panel function exist.It seems that panel.points
>> plus panel.lines are what you want.
>>
>>> dat<-data.frame(x=1:10,y=1:10,z=sample(letters[1:3],10,T))
>>> xyplot(y~x | z, data = dat,pan=function(x,y,...)
>>> {panel.points(x,y,...);panel.lines(x,y,...)})
>>
>>
>>
>>
>>
>> 2006/6/21, Benjamin Tyner <btyner@gmail.com>:
>>
>>> Is there any way to have xyplot produce the "points connected by lines"
>>> analogous to the effect of type="b" under standard graphics? I seem to
>>> recall doing this in xyplot at one point.
>>>
>>> Thanks,
>>> Ben
>>>
>>> ______________________________________________
>>> R-help@stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide!
>>> http://www.R-project.org/posting-guide.html
>>>
>>

>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/


______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Received on Wed Jun 21 13:42:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 21 Jun 2006 - 16:12:45 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.