From ligges@amadeus.statistik.uni-dortmund.de  Thu Mar 21 12:13:52 2002
From: ligges@amadeus.statistik.uni-dortmund.de (ligges@amadeus.statistik.uni-dortmund.de)
Date: Thu, 21 Mar 2002 13:13:52 +0100 (MET)
Subject: [Rd] legend - bug with argument angle (PR#1404)
Message-ID: <200203211213.NAA21145@pubhealth.ku.dk>

When legend() is used with the angle argument as follows, not only the
boxes beside the legend text, but also the whole legend box is filled
with shading lines.
I think this is not intended:

 plot(1:10)
 legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20)


I'd suggest as a fix (legend.R of R-1.5.0):

25c25
<     rect2 <- function(left, top, dx, dy, ...) {
---
>     rect2 <- function(left, top, dx, dy, angle, ...) {
133c133
<     rect2(left, top, dx = w, dy = h, col = bg)
---
>     rect2(left, top, dx = w, dy = h, col = bg, angle = NULL)
141c141
<     rect2(left=xt, top=yt+ybox/2, dx = xbox, dy = ybox, col = fill)
---
>     rect2(left=xt, top=yt+ybox/2, dx = xbox, dy = ybox, col = fill, angle = angle)



Uwe Ligges

       _              
platform i386-pc-mingw32
arch     x86            
os       Win32          
system   x86, Win32     
status                  
major    1              
minor    4.1   [and 1.5.0]
year     2002           
month    01             
day      30             
language R

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] legend - bug with argument angle (PR#1404)
ligges@amadeus.statistik.uni-dortmund.de