Arkady.Sherman at ksu.ru
2008-Nov-29 19:05 UTC
[Rd] A small bug in R code of the legend function of the Graphics (PR#13350)
Martin Maechler wrote:> but do.lines is never specified. It can be FALSE (if there are no > lines drawn) and a user can indeed set 'merge = TRUE" in such a > situation. > However, can you think of a situation where this was desirable? > I think it should not have any effect in such a case > {... but unfortunately it currently has ... yet another > sign that legend() is ``hopelessly over-featured'' ;-) } > and possibly rather give a warning in such a case... > > > ASh> Guess that seg.len should be initialized before the condition "if (do.lines)" > > not really; it means 'segment length' should not be used unless > segments ("lines") are drawn. > > Thank you for your note; you are right that legend() is not > entirely correct in such a border-line situation. > > Regards, > Martin Maechler, ETH ZurichThanks for the response. Yes it's unusual to set merge without lines. I modified existing code and didn't pay attention to the merge parameter and got the error "object "seg.len" not found". There was no connection between the merge parameter and the error produced. So I modified the code and didn't unset merge :). So it's better to gave an warning, or to set automatically merge to false if isn't needed. Arkady
Possibly Parallel Threads
- A small bug in R code of the legend function of the Graphics pacakge (PR#13340)
- Can't open files containing russian letters in path (PR#13195)
- (PR#13195) Can't open files containing russian letters in path
- legend -- one more try
- legend() patch never seems to have made it in