It is useful to know how your data are currently set up, but if your panel data are in long format this is easier to generate this graph through the GUI dialog for GGRAPH. Because this is not how people typically have their data formatted, I generate some fake data in wide format and then transform it to long format and generate the requested graph. I have attached a picture (only slightly edited post-hoc + my personal chart template) from what is produced by the GGRAPH
command.
set seed = 10.
input program.
loop #i = 1 to 100.
compute case = #i.
end case.
end loop.
end file.
end input program.
dataset name sim.
execute.
vector V1_M(3,F1.0).
do repeat V1_M = V1_M1 to V1_M3.
compute V1_M = TRUNC(RV.UNIFORM(1,6)).
end repeat.
value labels V1_M1 to V1_M3
1 'Poor'
2 'Fairy'
3 'Average'
4 'Very Good'
5 'Excellent'.
varstocases
/make V1 from V1_M1 to V1_M3
/index = wave.
value labels wave
1 'First Month'
2 '3 Months'
3 '6 Months'.
DATASET ACTIVATE sim.
* Chart Builder.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=wave COUNT()[name="COUNT"] V1 MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: wave=col(source(s), name("wave"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
DATA: V1=col(source(s), name("V1"), unit.category())
GUIDE: axis(dim(1), label("Wave"))
GUIDE: axis(dim(2), label("Percent"))
GUIDE: legend(aesthetic(aesthetic.color.interior), label("V1"))
SCALE: linear(dim(2), include(0))
SCALE: cat(aesthetic(aesthetic.color.interior), include("1", "2", "3", "4", "5"))
ELEMENT: line(position(summary.percent(wave*COUNT, base.coordinate(dim(1)))), color.interior(V1),
missing.wings())
END GPL.