[R] Legend placement in barplot?

Henric Nilsson henric.nilsson at statisticon.se
Thu Nov 4 15:19:58 CET 2004


At 13:24 2004-11-04 +0000, Dan Bolser wrote:

> >Check out gplots::smartlegend (in the R 2.0.0 gregmisc bundle).
>This works great, but like the (smart)legend function, fill=true appears
>to be giving me only black boxes.
>Here is what I add..
>smartlegend(x="left",y="top",
>             c("PDB","MSD"),
>             fill=TRUE,
>             col=c("red","blue")
>            )

For coloured boxes, use

smartlegend(x="left",
                    y="top",
                    c("PDB","MSD"),
                  fill=c("red","blue"))

HTH,
Henric




More information about the R-help mailing list