Dear all 
I am using color2D.maplot to map some matrixes to plot. everything works fine. 
It seems that when my matrix contains only the same value color2D.maplot 
returns the following error:


color2D.matplot(estimatedsr,redrange=c(0,1),greenrange=c(0,.5),bluerange=c(0,.5),xlab="x",ylab="y",main=sprintf('Estimated'),show.legend=TRUE,show.values=TRUE)
Error in rgb(reds, greens, blues) : color intensity 18.5, not in [0,1]
Calls: color2D.matplot -> color.scale -> rgb


if you want to generate the error above try the following:


require('plotrix')
estimatedsr<-matrix(data=18.5,ncol=6,nrow=6)
color2D.matplot(estimatedsr,redrange=c(0,1),greenrange=c(0,.5),bluerange=c(0,.5),xlab="x",ylab="y",main=sprintf('Estimated'),show.legend=TRUE,show.values=TRUE)

______________________________________________
R-help@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.

Reply via email to