ligges@amadeus.statistik.uni-dortmund.de
2002-Mar-21 12:13 UTC
[Rd] legend - bug with argument angle (PR#1404)
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
maechler@stat.math.ethz.ch
2002-Mar-21 16:13 UTC
[Rd] legend - bug with argument angle (PR#1404)
>>>>> "UweL" == Uwe Ligges <ligges@amadeus.statistik.uni-dortmund.de> writes:UweL> When legend() is used with the angle argument as follows, not only the UweL> boxes beside the legend text, but also the whole legend box is filled UweL> with shading lines. UweL> I think this is not intended: UweL> plot(1:10) UweL> legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20) UweL> I'd suggest as a fix (legend.R of R-1.5.0): UweL> 25c25 UweL> < rect2 <- function(left, top, dx, dy, ...) { UweL> --- >> rect2 <- function(left, top, dx, dy, angle, ...) { UweL> 133c133 UweL> < rect2(left, top, dx = w, dy = h, col = bg) UweL> --- >> rect2(left, top, dx = w, dy = h, col = bg, angle = NULL) UweL> 141c141 UweL> < rect2(left=xt, top=yt+ybox/2, dx = xbox, dy = ybox, col = fill) UweL> --- >> rect2(left=xt, top=yt+ybox/2, dx = xbox, dy = ybox, col = fill, angle = angle) Thank you, Uwe! The fix looks very reasonable and should make it to R-devel soon. Martin -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._