An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131110/5893ef25/attachment.pl>
Plotrix: Add text below the color- legend.
5 messages · Alaios, Jim Lemon
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131110/5662a59d/attachment.pl>
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
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131110/e60e8393/attachment.pl>
1 day later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131112/369d2ae1/attachment.pl>