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

From: John Bullock <john.bullock_at_stanford.edu>
Date: Sun 01 Apr 2007 - 19:25:18 GMT

>> 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

From: "Gabor Grothendieck" <ggrothendieck@gmail.com> To: "John Bullock" <john.bullock@stanford.edu> Cc: <r-help@stat.math.ethz.ch>
Sent: Sunday, April 01, 2007 12:14 PM
Subject: Re: [R] line endings in lattice plots: square vs. round

> See gpar in grid:
>
> library(grid)
> ?gpar
>
> library(lattice)
> xyplot(rivers ~ rivers, type = "l", lwd = 10,
> lineend = 1)
>

Thanks. It works. I didn't know that you could feed gpar arguments to lattice commands that way.

--John



R-help@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. Received on Mon Apr 02 05:29:35 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 01 Apr 2007 - 20:32:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.