[R] points marking

Greg Snow Greg.Snow at imail.org
Thu Jun 10 19:40:37 CEST 2010


Your question is not really clear, do either of these examples do what you want?

 with(anscombe, plot(x1, y2, ylim=range(y2,y3)) )
 with(anscombe, points(x1, y3, col='blue', pch=2) )
 with(anscombe, segments(x1, y2, x1, y3, col=ifelse( y2>y3, 'green','red') ) )


 with(anscombe, plot(x1, y2, ylim=range(y2,y3), type='n') )
 with(anscombe[order(anscombe$x1),], polygon( c( x1,rev(x1) ), c(y2, rev(y3)), col='grey' ) )



-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of khush ........
> Sent: Thursday, June 10, 2010 7:48 AM
> To: r-help at r-project.org
> Subject: [R] points marking
> 
> Hi,
> 
> How to  mark points on x axis of a graph keeping x axis as constant and
> changing y from y1 to y2 respectively. I want to highlight the area
> from y1
> to y2.
> 
> Any suggestions
> 
> Thank you
> Jeet
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.



More information about the R-help mailing list