I am trying to create a stacked bar plot, but I cannot position the legend so that it does not overlap any of the bars. I have tried adjusting the margins, setting xl
xl
You should add xpd=TRUE in par()
xpd=TRUE
par()
par(mfrow=.., mar=...,xpd=TRUE)