[R] Lattice and Axis height

Deepayan Sarkar deepayan.sarkar at gmail.com
Mon Oct 6 21:18:01 CEST 2008

On Mon, Oct 6, 2008 at 10:37 AM, Saptarshi Guha
<saptarshi.guha at gmail.com> wrote:
> Hello,
> My plots consist of 2 rows, 1 column, many pages
> I've managed to selectively turn of strips for the bottom panel and
> roll my own strip for the top
>  par.strip.text = list(lines = c(0,3),cex=0.6)
> I have my own custom prepanel function too.
> What i'd like to do is turn off the x-axis for the top panel (since on
> a given page the xlim is same for both top and bottom panel, but the
> ylims are different)
> I've tried scales(x=list(draw=(T,F),relation="free") which doesn't
> work(i'm still using relation="free")
> (Relation="same" doesn't reflect the changing xlims for each page)
> In the lattice book, it mentions that panel, strip and between are
> replicated and axis.top seems useful but don't know
> how to use.
> Since these the bottom strip of every panel is grid viewport with a
> height, there could be an option to set the height to 0 when I'm the
> top panel.
> Or maybe like par.strip.text I could set it to a vector equal to the
> length of the panels, alternating (Draw,DontDraw,Draw,....)
> Is this possible?



Note that if your prepanel function gives you the same xlim for both
rows for a given column, you don't need to specify the limits


> Regards
> Saptarshi
> P.S I'm essentially passing dummy variables to xyplot and for each
> value of the dummy variable pulling in data from a postgres database
> setting my limits for each panel based on the pulled in data and
> plotting that.
> Saptarshi Guha | saptarshi.guha at gmail.com | http://www.stat.purdue.edu/~sguha
>        [[alternative HTML version deleted]]
> ______________________________________________
> 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.

More information about the R-help mailing list