On 11/11/2013 04:57 AM, Alaios wrote:
Hi all,

I am plotting very nice looking mattrices with  plotrin...

so far so good, I would like though to ask you if it would be possible to add 
at the bottom of the color.legend (this lovely color bar that maps colors to 
numbers).
Would that be possible to do that?

Hi Alex,
It is not too difficult:

# first allow printing outside the plot
par(xpd=TRUE)
# get the x component of the label
# from the values passed to color.legend
# see the help page
labelx<-(xl+xr)/2
# get the y coordinate from the y value
labely<-yb-strheight("M")
# display the label
text(labelx,labely,mylabel)
# restore the clipping
par(xpd=FALSE)

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