On 07/28/2011 04:00 PM, hitendra padalia wrote:
Dear all,

Can you pl. help me in plotting a matrix into 2D plot with more color
options. I tried to plot with myImagePlot with
RGB color ramp but it shows limited variation in color. There is a rainbow
plot option also. Can anyone help me.

Hi Hitendra,
You can specify colors from the rainbow function for color2D.matplot in the plotrix package. However, try this:

colormat<-matrix(runif(100),nrow=10)
color2D.matplot(colormat,c(1,1,0,0,1),c(0,1,1,1,0),c(0,0,0,1,1))
color.legend(0,-1.6,4,-1.1,seq(0,1,by=0.2),color.scale(seq(0,1,by=0.1),
 c(1,1,0,0,1),c(0,1,1,1,0),c(0,0,0,1,1)))

Jim

______________________________________________
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