[R] line width in legend of interaction.plot

Matthias Gondan matthias-gondan at gmx.de
Wed Feb 22 19:37:16 CET 2012


Dear R developers,

The following command produces an interaction plot with lwd=2.

interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2)

In the legend, however, lwd seems to be 1, which does not seem
to be intended behavior. Probably the lwd is not correctly forwarded
to legend:

from the interaction.plot source:

         legend(xleg, yleg, legend = ylabs, col = col, pch = if (type %in%
             c("p", "b"))
             pch, lty = if (type %in% c("l", "b"))
             lty, bty = leg.bty, bg = leg.bg) <- here I would add 
lwd=<well, the lwd from the ... argument, or perhaps something like leg.lwd>

Best wishes,

Matthias Gondan



More information about the R-help mailing list