Graphical methodsLinear modelsCategorical dataStructural equation modelsUtility macrosMy Books
Univariate displays
Bivariate displays
Multivariate displays
Cluster analysis
Maps
boxplot
density
dotplot
nqplot
splot
symbox
symplot
contour
ellipses
lowess
miplot
resline
sparkline
sunplot
surface
biplot
canplot
coplot
corrgram
cqplot
faces
genscat
hecan
hemat
hemreg
heplot
heplots
mpower
outlier
robcov
scatmat
scatter
stars
gtree
ccmap
map2gen
ANOVA
Regression
Multivariate
Transformations
Power
alleff
effplot
hovplot
meanplot
orpoly
poly
twoway
cpplot
effplot
partial
inflplot
robust
rsqdelta
hecan
hemat
hemreg
heplot
heplots
boxcox
boxglm
boxtid
sprdplot
fpower
mpower
power
rpower
Discrete distributions
Two-way tables
Mosaic displays
Generalized linear models
distplot
goodfit
ordplot
poisplot
rootgram
agree
agreeplot
corresp
ffold
fourfold
power2x2
powerrxc
sieve
sieveplot
missrc
genscat
mosaic
mosaics
mosmat
addvar
catplot
effplot
halfnorm
inflglim
inflogis
logodds
powerlog
robust
caliscmp
calisgfi
csmpower
eqs2ram
ram2dot
str2ram
Data utility
Graphics utility
Macro utility
Color
combine
combos
dummy
expgrid
interact
jitter
lags
map2gen
multisummary
mvnormal
sas2vsta
scale
slice
sort
stat2dat
table
axis
bars
boxanno
boxaxis
equate
gask
gbank
gdispla
genpat
gensym
gkill
gskip
inset
label
labels
lines
panels
points
polygons
pscale
regline
rug
expglm
defined
lastword
vexpand
words
bpycolors
brewerpal
colochrt
colorramp
SAS System for Statistical Graphics
Visualizing Categorical Data
Visual Statistics
scatter Scatterplot matrix with SAS/INSIGHT scatter

SAS Macro Programs: scatter

$Version: 1.1 (1 Oct 1997)
Michael Friendly
York University

Updated 09/22/2009 21:45:44

The scatter macro ( [download] get scatter.sas)

Scatterplot matrix with SAS/INSIGHT

The scatter macro uses SAS/INSIGHT to produce a scatterplot matrix for two or more variables, showing all pairwise plots. If observations are classified by a grouping variable, colors and symbols may be assigned automatically to the observations in different groups.

The macro must be run in the SAS Display Manager, not in batch. Also, the macro starts SAS/INSIGHT with a PROC INSIGHT statement, so you must terminate INSIGHT before you can run additional procedures from the Program Manager.

Usage

scatter is a macro program. Specify the names of the VAR= variables, and the GROUP= or CLASS= grouping variable. All options have default values.

The arguments may be listed within parentheses in any order, separated by commas. For example:

   %scatter(data=iris, var=sepalwid sepallen petalwid petallen, class=species);

Arguments

DATA=
The name of the SAS dataset to be plotted. If DATA= is not specified, the most recently created data set is used.
VAR=_numeric_
List of variables to be plotted. The default is to plot all numeric variables in the dataset.
CLASS=
GROUP=
Name of an optional grouping variable used to define the plot symbols and colors.
SYMBOLS=square plus circle diamond X up down star
List of symbols, separated by spaces, to use for plotting points in each of the groups. The i-th element of SYMBOLS is used for group i.
COLORS=BLACK RED GREEN BLUE BROWN YELLOW ORANGE PURPLE
List of colors to use for each of the groups. If there are g groups, specify g colors. The i-th element of COLORS is used for group i.

Notes

The scatter macro calls the paint macro to assign colors and symbols to the observations.

Example

%include goptions;
%include data(iris);
%scatter(data=iris,
    var=sepalwid sepallen petalwid petallen,
	 class=species)

See also

scatmat Scatterplot matrix
paint