[R] line endings in lattice plots: square vs. round

Gabor Grothendieck ggrothendieck at gmail.com
Sun Apr 1 21:14:46 CEST 2007


See gpar in grid:

library(grid)
?gpar

library(lattice)
xyplot(rivers ~ rivers, type = "l", lwd = 10, lineend = 1)

On 4/1/07, John Bullock <john.bullock at stanford.edu> wrote:
>
> I would like to use llines() to draw lines with
> square endings in lattice plots.  But the default
> behavior seems to be to draw lines with round
> endings.  How can I change this?
>
> I'm looking for a parameter like par('lend') or
> get.gpar('lineend'), but trellis.par.get() doesn't
> seem to have anything analogous.
>
> I searched the archives but saw nothing on this.
> I'm running R 2.3.1 with lattice 0.13.
>
> Thank you,
> --John
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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