[R] Error in 'legend' help?

Rau, Roland Rau at demogr.mpg.de
Thu Mar 25 14:17:54 CET 2004


Dear all,

maybe I have misunderstood something but to me it seems like a minor error
in the help for
?legend
for the argument 'bg'. There it says:

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

I think, however, that it should be changed to:

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

Here is some example code. And only in the upper panel we can see a legend
with a blue background.

par(mfrow=c(2,1))
plot(x=1:10, y=1:10)
legend(x=5,y=5, legend="Legend-Text", bty="o", bg="blue")

plot(x=1:10, y=1:10)
legend(x=5,y=5, legend="Legend-Text", bty="n", bg="blue")

My R version is:
> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    8.1            
year     2003           
month    11             
day      21             
language R       

Best,
Roland



+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}




More information about the R-help mailing list