[Rd] legend() graphics output bug (PR#5725)

ligges at statistik.uni-dortmund.de ligges at statistik.uni-dortmund.de
Fri Dec 12 11:27:03 MET 2003


gasser at websource.ch wrote:
> Full_Name: Daniel Gasser
> Version: 1.8.1
> OS: Win XP
> Submission from: (NULL) (130.60.20.92)
> 
> 
> The legend()-Function shows a different behaviour than it did in Version 1.6.1.
> It plots a black box left of the legend lines on each legend row. In 1.6.1 there
> was just the line in appropriate color for each row in the legend (i was using
> exactly the same legend statement and same plot function).
> My legend statement is:
> legend(x=(daysold+2), y=0.95*maxy.j, legend=leg.txt, col = leg.col, lty=1,angle
> = NULL, density = NULL, bty = "o", xjust = 0, yjust = 1, x.intersp = 1,
> y.intersp = 1, ncol = 1, horiz = FALSE)
> 
> If i write the statement as follows:
> legend(x=(daysold+2), y=0.95*maxy.j, legend=leg.txt, col = leg.col, lty=1,angle
> = NULL, density = NULL, bty = "o", xjust = 0, yjust = 1, x.intersp = 1,
> y.intersp = 1, ncol = 1, horiz = FALSE, merge = TRUE)
> 
> The merge = TRUE statemen merges the black boxes (one for each row) and the
> colored lines in the legend, but the boxes remain there.

Don't specify "density" which implies that you are requesting the boxes. 
Looks like there was a bug in R-1.6.1 that has been fixed.

Uwe Ligges



More information about the R-devel mailing list