[R] How to plot a scatter-plot matrix?

Gavin Simpson gavin.simpson at ucl.ac.uk
Fri Jul 11 17:56:48 CEST 2003


[from help on pairs() ]:


        x: the coordinates of points given as columns of a matrix.

So yes, pairs will do what you ask.  See ?pairs for more info.

Also you might consider the alternative function from the lattice package:

 > library(lattice)	#load lattice graphics package
 > ?splom		#help for splom()

Which is called differently using a formula interface.



Feng Zhang wrote:

> Hey, R-listers
> I am going to plot a scatter-plot matrix using R.
> For example, give a matrix X=[x1, x2, ..., xn]
> where each xi is a column vector, how to plot
> all the pair scatter-plots between two different
> xi and xj?
> Is PAIRS able to achieve this function?
> Thanks for your help.
> Fred
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpson at ucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.

More information about the R-help mailing list