*
* @SPLOM does a scatter plot matrix - an NxN matrix of bivariate
* scatter plots
*
* Syntax:
*  @SPLOT(options) start end
*  # list of series
*
* Options:
*  LABELS=VECTOR of STRINGS to label the variables [series names]
*
* Revision Schedule:
*  06/05 Written by Tom Doan, Estima.
*
procedure splom start end
type integer start end
*
option vect[strings] labels
*
local vect[integer] list
local vect[strings] rclabels
local integer startl endl
local integer i j n
*
enter(varying) list
compute n=%rows(list)
inquire(reglist) startl>>start endl>>end
# list
*
dim rclabels(n)
ewise rclabels(i)=%l(list(i))
if %defined(labels) {
   do i=1,%imin(%rows(labels),n)
      compute rclabels(i)=labels(i)
   end do i
}
spgraph(hfields=n,vfields=n,xlabels=rclabels,ylabels=rclabels)
do i=1,n
   do j=1,n
      if i<>j
         scatter(vscale=none,hscale=none,axis=none) 1 i j
         # list(i) list(j) startl endl
   end do j
end do i
spgraph(done)
end

