[R] legend

Hedderik van Rijn hedderik at cmu.edu
Thu Feb 13 00:51:03 CET 2003


> legend(locator(1), month.abb[1:5], fill=T, col=1:5)
>
> gives me 5 black boxes.

Try:

legend(locator(1), month.abb[1:5], fill=1:5)

> What am I doing wrong?

The "T" is interpreted as (equal to?) a "1", so you're requesting the 
boxes to be filled with color 1, which is black.

  - Hedderik.




More information about the R-help mailing list