Thanks! It worked. 

Regards
Alex





On Monday, November 11, 2013 12:02 AM, Jim Lemon <jim@bitwrit.com.au> wrote:
 
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
	[[alternative HTML version deleted]]

