Figure 1. GPL for grouped scatterplot
* Open sample file Employee Data.sav.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary gender
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
DATA: gender=col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary), color(gender))
END GPL.
Figure 2. Grouped scatterplot