Re: [R] Borders on a polygon

From: Sean Anderson <lists_at_seananderson.ca>
Date: Mon, 07 Jun 2010 21:43:33 -0300

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:

plot.new()

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

______________________________________________
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. Received on Tue 08 Jun 2010 - 00:47:39 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Jun 2010 - 03:00:28 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.

list of date sections of archive