Re: [R] Panels order in lattice graphs

From: Cristina Silva <csilva_at_ipimar.pt>
Date: Fri, 06 May 2011 18:58:47 +0100

Thanks to all that reply to my post. The best solution that answers entirely to my question and can be used as a general function and not case by case is the one sent by the package author.

Many thanks to everybody. It was helpful.

Cristina

On 05/05/2011 10:44, Deepayan Sarkar wrote:
> On Wed, May 4, 2011 at 9:20 PM, Cristina Silva<csilva_at_ipimar.pt> wrote:
>> Hi all,
>>
>> In lattice graphs, panels are drawn from left to right and bottom to top.
>> The flag "as.table=TRUE" changes to left to right and top to bottom. Is
>> there any way to change to first top to bottom and then left to right?
>> didn´t find anything neither in Help pages nor Lattice book.
> See ?packet.panel.default. For example,
>
>
> p<- xyplot(mpg ~ disp | factor(carb), mtcars, as.table = TRUE)
>
> print(p, packet.panel = packet.panel.default)
>
> my.packet.panel<-
> function(layout, condlevels, page, row, column, ...)
> {
> tlayout<- layout[c(2, 1, 3)] # switch row and column
> print(packet.panel.default(tlayout, condlevels, page = page,
> row = column, column = row, ...))
> }
>
> print(p, packet.panel = my.packet.panel)
>
>
> -Deepayan
>

-- 
------------------------------------------
Cristina Silva
INRB/L-IPIMAR
Unidade de Recursos Marinhos e Sustentabilidade
Av. de Brasília, 1449-006 Lisboa
Portugal
Tel.: 351 21 3027096
Fax: 351 21 3015948
csilva_at_ipimar.pt

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 06 May 2011 - 18:00:22 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 May 2011 - 18:10:05 GMT.

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

list of date sections of archive