[R] axis manipulation in levelplot

From: Toby Daniel Ahrens <tahrens_at_stanford.edu>
Date: Fri 05 May 2006 - 04:52:55 EST


I am trying to print multiple levelplots on a single page, and I am having trouble manipulating individual axes on the plots. I do not want a box around the entire plot; on some plots I would like to show only the x-axis (with line, tick marks and labels), and on other plots both x- and y-axes.

I am working from Windows XP with R 2.0.1, and my code is below. Right now, the code results in a contour plot printed with ticks and labels only on the x axis, but the plot still has a box around the entire plot. If I set the axis.line in trellis.par.set to "transparent", I lose the box and the x-axis line and ticks, and I can't figure out how to re-print them.

Thanks very much in advance,


Here is the code that I am working from, although I have not included my data (w$data) to keep the size of this email small:

a=levelplot(data~x+y, w, aspect = "iso",cuts=100, col.regions=c(rgb(0:255,0:255,255,max=255),rev(rgb(255,0:255,0:255,max=255))),xlab="",ylab="",colorkey=F, scales=list(draw=F))

trellis.par.set(list(background=list(col="white"),axis.line = list(col = "black")))
print(a,position=c(0.1,0.1,1,1),split=c(1,1,2,2),more=T) trellis.focus("panel", 1, 1, clip.off=TRUE, highlight=FALSE) panel.axis("bottom", check.overlap=TRUE, outside=TRUE)

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 Fri May 05 04:57:47 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 Sat 06 May 2006 - 08:10:03 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.