Skip to content
Prev 178793 / 398506 Next

legend with small colored boxes

Christophe Dutang wrote:
Ah Cristophe, you have been waylaid by the coercion of types. The fill 
argument specifies the colors of the boxes, and you have sent it TRUE. 
As TRUE happens to be equal to 1, legend is fooled into filling the 
boxes with the color assigned the number 1, which is black. Try:

legend(...,fill=c("black","blue"),...)

Jim