

Thank you so much Richard. Your solution worked like a charm. I worked out my weight vector w for each type of my plots and the results were smooth as butter.



Sure I shall be succinct in display of code and data inside correspondence to r-help in future. Dennis gave me a few tips on how to do that.



Thanks again,

Fayez



________________________________
From: Richard M. Heiberger [rmh@temple.edu]
Sent: Monday, August 05, 2013 11:38 PM
To: Aziz, Muhammad Fayez
Cc: r-help@r-project.org
Subject: Re: [R] How to auto adjust panel width according to number of box plots in bwplot

library(lattice)
library(latticeExtra)
tmp <- data.frame(a=1:20, b=LETTERS[rep(1:5,c(2,4,3,4,7))], cc=letters[rep(1:2, c(6,14))])
tmp
bwplot(a ~ b | cc, data=tmp)
bwplot(a ~ b | cc, data=tmp, scales=list(x=list(relation="free")))
resizePanels(bwplot(a ~ b | cc, data=tmp, scales=list(x=list(relation="free"))), w=c(2,3))

Please use minimal data in furture queries to this list.

Rich


On Mon, Aug 5, 2013 at 2:18 PM, Aziz, Muhammad Fayez <aziz4@illinois.edu<mailto:aziz4@illinois.edu>> wrote:

Hi,

My question is how to auto adjust panel width according to number of box plots in bwplot. I mean if a panel has 10 box plots and another has only two, I need to make the later panel thinner than the first. I am familiar with panel.width and layout.widths params but couldn't work it in my code below. Data I am using follows.


	[[alternative HTML version deleted]]

