[R] legend: bold and color of border

Jim Lemon jim at bitwrit.com.au
Sat Mar 15 11:28:58 CET 2008


Thomas Steiner wrote:
> How do I write bold face in the legend - the function does not accept
> font=2 as argument?
> 
> How do I plot a legend box with a background color, but not a border?
> Or, better: How do I specify the color of the legend-box-borderline?
> 
> Okay, I abuse the legend, but have a look at
> http://de.wikipedia.org/wiki/Bild:EurUsd.png if you want... Any
> help/feedback appreciated!

Hi Thomas,

par(font=2)

before calling legend.
If you just want a label as in your example, it might be easier to use:

boxed.labels(strptime("01/02/02","%d/%m/%y"),1.5,
  "Beeblebrox",bg="lightblue",border=FALSE,col="white")

Jim



More information about the R-help mailing list