[R] line width in legend of interaction.plot
ilai
keren at math.montana.edu
Wed Feb 22 20:15:15 CET 2012
On Wed, Feb 22, 2012 at 11:37 AM, Matthias Gondan
<matthias-gondan at gmx.de> wrote:
> 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.
Why not? Your suggestion will cause something like this to be the default
interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=4,legend=F)
legend('topleft',c('1','2'),lty=1:2,lwd=4)
Which seems worse to me.
Cheers
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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list