Re: [R] Hmisc xYplot: two ablines?

From: Michael Kubovy <kubovy_at_virginia.edu>
Date: Wed 11 Jan 2006 - 06:17:28 EST

To r-help:

Thanks to Mat Soukup for the help:

To draw two ablines:

xYplot(lo ~ vaR, groups = v, data = abc.fp, aspect = "xy", col = c
("red","blue"),

	xlab=expression(frac(abs( bold(v) ),abs( bold(a) ))),
	ylab = grid::textGrob(expression(paste(log, frac( italic(p) ( italic 

(v) ), italic(p) ( italic(a) )))) ),
panel=function(x,y,...){ panel.xYplot(x, y, ...) panel.abline(a = 7.985090, b= -7.985090, col = "red") panel.abline(a = 7.926507, b = -7.926507, col = "blue", lty = 2) }

)

This is (to me) a surprising syntactic leap from one abline in xYplot, which can be requested without writing a panel function:

xYplot(lo ~ vaR, groups = v, data = abc.fp, aspect = "xy", col = c
("red","blue"),

	xlab=expression(frac(abs( bold(v) ),abs( bold(a) ))),
	ylab = grid::textGrob(expression(paste(log, frac( italic(p) ( italic 

(v) ), italic(p) ( italic(a) )))) ),
panel.abline(a = 7.985090, b= -7.985090, col = "red")
)

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/

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 Wed Jan 11 06:27:37 2006

This archive was generated by hypermail 2.1.8 : Wed 11 Jan 2006 - 14:10:43 EST