Hi Jim and thanks for help I will need some help to make -the legend visible (probably at the right side of the window) -split the legend at 0.1 steps -1,-0.9,-0.8.....1 and
-assign a color heat.color(30). I have selected orange and reds -show me the way to change the size of legend if it would be needed par(mar=c(7,4,4,6)) test<-matrix(data=runif(10000),nrow=100) color2D.matplot(test,axes="F",xlab="",ylab="",show.legend=FALSE) #,show.legend=TRUE axis(1,at=seq(1:nrow(test)),labels=seq(201,300)) # color.legend(11,6,11.8,9,seq(-1,1,length=10),rect.col=heat.colors(30),gradient="y") I would like to thank you in advance for your help Regards Alex On Friday, October 25, 2013 11:50 AM, Jim Lemon <j...@bitwrit.com.au> wrote: On 10/25/2013 08:38 PM, Alaios wrote: > Hi all, > I would like to ask your help to add a color band (Ã⢠am not sure > regarding the right term, this color band at the right of the plot > "describing" values with their corresponding color. > > For now I have only this code > > > > test<-matrix(data=runif(10000),nrow=100) > plot(test,axes="FALSE") > > axis(1,at=c(0,1),labels=c("a","b")) # > > butàI would like to add at the rightàside the color legend. > > How can I do that in R? > > I would like to thank you in advance for your help > Hi Alex, If all else fails, look at color.legend (plotrix). Jim [[alternative HTML version deleted]]
______________________________________________ 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.