Boxplot With Overlaid Dot Plot (GPL)

Figure 1. GPL for boxplot with overlaid dot plot
* Open sample file customer_subset.sav.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=region income
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: region = col(source(s), name("region"), unit.category())
  DATA: income = col(source(s), name("income"))
  GUIDE: axis(dim(2), label("Income"))
  GUIDE: axis(dim(1), label("Region"))
  SCALE: linear(dim(2), include(0))
  ELEMENT: schema(position(bin.quantile.letter(region*income)))
  ELEMENT: point.dodge.symmetric(position(bin.dot(region*income, dim(2))), 
                                 color(color.red))
END GPL.
Figure 2. Boxplot with overlaid dot plot
Boxplot with overlaid dot plot