Skip to content

barplot: legend: two rows

6 messages · Marion Wenty, Uwe Ligges

#
On 09.05.2012 13:23, Marion Wenty wrote:
Example:

bp <- barplot(1)
par(xpd = TRUE)
legend(bp, 0, xjust=0.5, legend=letters[1:5], lwd=1:5, ncol=3)

Uwe Ligges
1 day later
4 days later
#
On 15.05.2012 17:38, Marion Wenty wrote:
The previous version already worked for me, you just had to increase the 
bottom margin to make the second row of labels visible:

For example

par(mar=c(10,4.5+0.3529412*(max(nchar(colnames(dat1)))-1),1,1))

worked for me.

Uwe
6 days later