[R] Borders on a polygon

Sean Anderson lists at seananderson.ca
Tue Jun 8 02:43:33 CEST 2010

On Mon, Jun 7, 2010 at 6:55 PM, beloitstudent wrote:
> [...] I am trying to do some shading in R and am using the polygon() setting.
> I want the border on the top and bottom of the polygon, but not on the left
> and right. [...]

One way would be to add the borders after as lines. For example:

polygon(c(0,1,1,0), c(0,0,1,1), col = "yellow", border = NA)
lines(c(0,1), c(0,0))
lines(c(0,1), c(1,1))

More information about the R-help mailing list