Skip to content
Prev 42365 / 398506 Next

Barplot errors in MASS script

v.demart at libero.it wrote:
Set the  argument bg = "white"
Use heat.colors() (barplot() uses it to generate the colors).
legend(locator(1), c("Males", "Females"), fill = heat.colors(2),
       bg = "white")



That points us to a documentation bug in ?legend, whioch tells us in its 
Arguments section:

bg  the background color for the legend box. (Note that this is only 
used if bty = "n".)

Obviously, it is used if bty = "o", but *not* if "n".


Uwe Ligges