[R] Separate x-axis ticks for panels in xyplot()?

Michael Kubovy kubovy at virginia.edu
Tue May 8 21:57:06 CEST 2007


Dear r-helpers,

In an xyplot I have

xyplot(y ~ x | c, groups = g,
	scales = list(
		x = list(
			at = v1,
			labels = c('A', 'B', 'C', 'D'),
			rot = 45
		)
	)
)

g consists of two groups. How do I define a different set of x ticks  
and labels for the second panel? I'm looking for something like

xyplot(y ~ x | c, groups = g,
	scales = list(
		x = list(ifelse(g == g1, {
			at = v1,
			labels = c('A', 'B', 'C', 'D'),
			rot = 45},
			{at = v2,
			labels = c('E', 'F' 'G"),
			rot = 45}
		)
	)
)


_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/



More information about the R-help mailing list