[R] Unable to send color palette through plot.Design to method="image"

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Sat, 30 Aug 2008 15:08:11 -0400

I have been trying to specify a different color palette to the image method in plot.Design. My model has crossed two rcs() arguments and one two-level gender argument. The goal which appears to have been mostly achieved is to produce separate bivariate plots for men and women

The call to plot does produce a level plot but it appears only with the default color palette despite various efforts to supply a col argument. I even took a crack at hacking the plot.Design function, adding a col=col parameter to be passed in the function call to image(), but failed to get the desired effect:   # else image(xseqn, y, zmat, xlab = xlab, ylab = laby , col = col)

library(Hmisc); library(Design)
lr.fit6 <- lrm(death ~
rcs(BL_CHOLEST.A,c(180,220,280))*rcs(BL_HDL.A,c(40,55,70))*Sex, data = pref900)

# str(pref900[,c("BL_HDL.A","BL_CHOLEST.A","death")]) $'data.frame': 910659 obs. of 3 variables:
$ BL_HDL.A : num 34 35 40 46 39 45 46 34 42 52 ...
$ BL_CHOLEST.A: num 181 184 238 134 180 220 125 256 265 175 ...

plot(lr.fit6, BL_HDL.A=seq(25,125, length=50),BL_CHOLEST.A=seq(100, 350, length=70), Sex="Male", col = rainbow(15), method="image")

David Winsemius, MD, MPH
Heritage Laboratories,
West Hartford, CT, USA

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 Sat 30 Aug 2008 - 21:11:22 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 Sun 31 Aug 2008 - 15:04:22 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.

list of date sections of archive