[R] hide scatter points

Roy Mendelssohn Roy.Mendelssohn at noaa.gov
Fri Jul 9 21:27:46 CEST 2010


Try changing the plot call to:

> plot(x2, y2, type ="n")

look at:

?plot

-Roy


On Jul 9, 2010, at 12:20 PM, Marlin Keith Cox wrote:

> I need to hide scatter points and just leave the linear regression
> line.  I have tried to color the points "white", but that does not
> work.
> 
> A working example, I need the green plotted points to be transparent or hidden.
> 
> x2 <- seq(1,200,.5)
> y2 <- seq(5,204,.5)
> plot(x2, y2, pch=16, col="green")
> model<-lm(y2~x2)
> abline(model, lty=3, lwd=4, col="black")
> 
> Thanks ahead of time,
> 
> keith
> 
> -- 
> M. Keith Cox, Ph.D.
> Alaska NOAA Fisheries, National Marine Fisheries Service
> Auke Bay Laboratories
> 17109 Pt. Lena Loop Rd.
> Juneau, AK 99801
> Keith.Cox at noaa.gov
> marlinkcox at gmail.com
> U.S. (907) 789-6603
> 
> ______________________________________________
> 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.

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected"



More information about the R-help mailing list