Following is an example drawing a mean line. It uses the cars.sav
file shipped with SPSS.
The mean line is added by the second ELEMENT statement. If you want a
point instead, change interval to point. You might then want to
fiddle with the point size or symbol.
HTH,
Jon Peck
* boxplot with mean lines added.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=origin horse
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: origin=col(source(s), name("origin"), unit.category())
DATA: horse=col(source(s), name("horse"))
GUIDE: axis(dim(1), label("Country of Origin"))
GUIDE: axis(dim(2), label("Horsepower"))
SCALE: cat(dim(1), include("1", "2", "3"))
SCALE: linear(dim(2), include(0))
ELEMENT: schema(position(bin.quantile.letter(origin*horse)),size
(size."30px"))
ELEMENT: interval(position(region.spread.range(summary.mean
(origin*horse))),size(size."20px"))
END GPL.