[EMAIL PROTECTED] wrote:
> On 7/2/07, Michael Hoffman <[EMAIL PROTECTED]> wrote:
>> Consider this plot:
>>
>> xyplot(mpg ~ disp | cyl, mtcars, strip=F, strip.left=T, layout=c(1, 3),
>>         scales=list(relation="free"),
>>         par.settings=list(strip.background=list(col="transparent")))
>>
>> I want to have the "cyl" strip labels on the left side of the axis. Is
>> this possible?
> 
> No. (It's possible to have a legend there, which could be used to put
> row-specific ylab-s, for example, but it will be hard to make it look
> like strips)

Thanks for the response.

Not looking like a real strip is fine. What I want is essentially a 
secondary ylab for each row, and don't care about niceties such as 
shingle markings (I should have made the conditional factor(cyl) in the 
above plot).

But it looks like the legend goes to the left of the plot's ylab, and 
what I really want is for the secondary ylab to be between the primary 
ylab and the panel. So looks like I would have to eliminate the primary 
ylab from being drawn automatically and draw it myself in the legend? 
And I think I would have to manually calculate the panel heights as 
well, right? I don't see a way for the legend to get this out of the 
trellis object.

> xyplot(mpg ~ disp | cyl, mtcars, strip=F, strip.left=T, layout=c(1, 3),
>        scales=list(relation="free", y = list(draw = FALSE)),
>        axis = function(side, ...) {
>            if (side == "right")
>                panel.axis(side = "right", outside = TRUE)
>            else axis.default(side = side, ...)
>        },
>        par.settings=
>        list(strip.background=list(col="transparent"),
>             layout.widths = list(axis.key.padding = 5)))

This seems a lot easier.

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to