[R] image() colors

Elena MOLTCHANOVA moltchan at iiasa.ac.at
Tue Aug 7 17:04:56 CEST 2001


Hi, everybody!

I am currently dealing with spatial estimation and thus writing some 
smoothing algorithms. My question concerns the graphical output. I would 
like my function to produce a picture of input data (X) and of estimation 
results(Y). Both, X and Y are categorical variables which can take values 
1,2,...,Cl. So, basically I write

foo<-function(){
....

image(X,...,col=terrain.colors(Cl))
image(Y,...,col=terrain.colors(Cl))
}

However, as a result of smoothing, some classes may disappear completely. 
For example:

	  X		  Y
	1 1 1		1 1 1
	1 0 1		1 1 1
	1 1 1		1 1 1

In output then graph for X would have green for 0 and yellow for 1, whereas 
the graph for Y would be all green. Thus the two pictures cannot be 
compared. Is there any way around this problem?

Thank you in advance for any help.

Best regards,

Elena MOLTCHANOVA
IIASA
International Institute for Applied Systems Analysis
A-2361 Laxenburg, Austria
E-Mail: moltchan at iiasa.ac.at
Phone : +43 2236 807-0
Fax   : +43 2236 71313

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list