[R] how to plot only the upper triangle using the pairs function?

Greg Snow Greg.Snow at imail.org
Fri Mar 12 17:58:47 CET 2010


Is this what you want?

> pairs(iris[,-5], lower.panel=NULL)

Also look at the pairs2 function in the TeachingDemos package for a way to plot one set of variables against another set.

-- 
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 Jack Luo
> Sent: Friday, March 12, 2010 9:10 AM
> To: r-help at r-project.org
> Subject: [R] how to plot only the upper triangle using the pairs
> function?
> 
> Hi,
> 
> I am trying to use function pairs to plot the scatterplot, but I only
> want
> to keep the upper triangle, what's the argument to do this?
> 
> Thanks,
> 
> -Jack
> 
> 	[[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