[R] Using expression in Hmisc Key()

From: Michael Kubovy <kubovy_at_virginia.edu>
Date: Wed, 5 Dec 2007 21:13:21 -0500


Dear r-helpers,

How do I tell xYplot() and Key() that I want the labels in italic?

I tried this:

pdf(file = "khw.pdf", width = 8, height = 8) with(subset(khw, length < 1.6), xYplot(lo ~ length|sub, groups = v, aspect="xy", pch = c(1, 2, 16), col = c(2, 4, 9), xlab=expression(frac(abs(bolditalic(v) ), abs(bolditalic(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.lmline(x, y, type = "l")
	}))

Key(x = 0.667, y = 0.833, other = list(title = expression(italic(v)), cex.title = 1,

        labels = c(expression(italic(b)), expression(italic(c)), expression(italic(d)))))
dev.off()

This works only for the title.



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_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. Received on Thu 06 Dec 2007 - 02:17:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Dec 2007 - 08:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.