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.
ligges@statistik.uni-dortmund.de
2003-Dec-12 11:25 UTC
[Rd] legend() graphics output bug (PR#5725)
gasser@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