cgenolin at u-paris10.fr
2009-Mar-23 23:25 UTC
[Rd] matplot does not considere the parametre lend (PR#13619)
Full_Name: Christophe Genolini Version: 2.8.1, but also 2.9 OS: Windows XP Submission from: (NULL) (82.225.59.146) I am using matplot with the option lend="butt", but only the first line (the black) is printed correctly :> matplot(matrix(1:9,3),type="c",lwd=10,lty=1,lend="butt")Gabor Grothendieck find the problem in matplot code: the ... is passed to plot (which plots the first series) but not to lines (which plots the rest): if (!add) { ii <- ii[-1] plot(x[, 1], y[, 1], type = type[1], xlab = xlab, ylab = ylab, xlim = xlim, ylim = ylim, lty = lty[1], lwd = lwd[1], pch = pch[1], col = col[1], cex = cex[1], bg = bg[1], ...) } for (i in ii) { lines(x[, i], y[, i], type = type[i], lty = lty[i], lwd = lwd[i], pch = pch[i], col = col[i], cex = cex[i], bg = bg[i]) }
Duncan Murdoch
2009-Mar-23 23:35 UTC
[Rd] matplot does not considere the parametre lend (PR#13619)
On 23/03/2009 7:25 PM, cgenolin at u-paris10.fr wrote:> Full_Name: Christophe Genolini > Version: 2.8.1, but also 2.9 > OS: Windows XP > Submission from: (NULL) (82.225.59.146) > > > I am using matplot with the option lend="butt", but only the first line (the > black) is printed correctly : > >> matplot(matrix(1:9,3),type="c",lwd=10,lty=1,lend="butt")I'd call this another case where it is performing as documented, but should probably be changed (but not by me). In the meantime, there's the simple workaround: save <- par(lend="butt") matplot(matrix(1:9,3),type="c",lwd=10,lty=1) par(save) Duncan Murdoch> > Gabor Grothendieck find the problem in matplot code: > the ... is passed to plot (which plots the first series) but not to lines (which > plots the rest): > > if (!add) { > ii <- ii[-1] > plot(x[, 1], y[, 1], type = type[1], xlab = xlab, ylab = ylab, > xlim = xlim, ylim = ylim, lty = lty[1], lwd = lwd[1], > pch = pch[1], col = col[1], cex = cex[1], bg = bg[1], > ...) > } > for (i in ii) { > lines(x[, i], y[, i], type = type[i], lty = lty[i], lwd = lwd[i], > pch = pch[i], col = col[i], cex = cex[i], bg = bg[i]) > } > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
maechler at stat.math.ethz.ch
2009-Apr-23 14:05 UTC
[Rd] matplot does not considere the parametre lend (PR#13619)
>>>>> "DM" == Duncan Murdoch <murdoch at stats.uwo.ca> >>>>> on Mon, 23 Mar 2009 19:35:15 -0400 writes:DM> On 23/03/2009 7:25 PM, cgenolin at u-paris10.fr wrote: >> Full_Name: Christophe Genolini >> Version: 2.8.1, but also 2.9 >> OS: Windows XP >> Submission from: (NULL) (82.225.59.146) >> >> >> I am using matplot with the option lend="butt", but only the first line (the >> black) is printed correctly : >> >>> matplot(matrix(1:9,3),type="c",lwd=10,lty=1,lend="butt") DM> I'd call this another case where it is performing as documented, but DM> should probably be changed (but not by me). I have now added the desired feature to R-devel and 'R 2.9.0 patched'. Martin Maechler DM> In the meantime, there's the simple workaround: DM> save <- par(lend="butt") DM> matplot(matrix(1:9,3),type="c",lwd=10,lty=1) DM> par(save) DM> Duncan Murdoch >> >> Gabor Grothendieck find the problem in matplot code: >> the ... is passed to plot (which plots the first series) but not to lines (which >> plots the rest): >> >> if (!add) { >> ii <- ii[-1] >> plot(x[, 1], y[, 1], type = type[1], xlab = xlab, ylab = ylab, >> xlim = xlim, ylim = ylim, lty = lty[1], lwd = lwd[1], >> pch = pch[1], col = col[1], cex = cex[1], bg = bg[1], >> ...) >> } >> for (i in ii) { >> lines(x[, i], y[, i], type = type[i], lty = lty[i], lwd = lwd[i], >> pch = pch[i], col = col[i], cex = cex[i], bg = bg[i]) >> } >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel DM> ______________________________________________ DM> R-devel at r-project.org mailing list DM> https://stat.ethz.ch/mailman/listinfo/r-devel