Figure 1. GPL for dot plot
* Open sample file Employee Data.sav.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=salary
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)))
END GPL.
Figure 2. Dot plot
Figure 3. GPL for grouped dot plot
* Open sample file Employee Data.sav.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=gender salary
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(1), label("Salary"))
COORD: rect(dim(1))
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)),
color(gender), shape(shape.square))
END GPL.
Figure 4. Grouped dot plot