The outcome is a APA style formatted figure with the legend inside the frame or perimeter of the plot.
My brief and not-so happy experience with GPL is that the legend is placed outside the frame/perimeter and, if controllable, I don’t know how to do it. And, the syntax below generates two legends. I think that I could remove the ‘point’
element and get rid of the second legend but I would like to keep the identified points since the data are collected at discrete points in time. That’s less important than the legend problem.
What I’m running right now is this.
GGRAPH /GRAPHDATASET NAME="GraphDataset" VARIABLES=time cig6_r FRADST/
GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("GraphDataset"))
DATA: time=col(source(s), name("time"))
DATA: cig6_r=col(source(s), name("cig6_r"), unit.category())
DATA: FRADST=col(source(s), name("FRADST"))
GUIDE: axis(dim(1), label("Assessment Time Point (Yrs)"), start(0), delta(.5))
GUIDE: axis(dim(2), label("Mean Depression Total Score Percentile"),
start(48), delta(2))
SCALE: linear(dim(2), min(48), max(58))
ELEMENT: point(position(summary.mean(time*FRADST)), shape(cig6_r))
ELEMENT: line(position(summary.mean(time*FRADST)), shape(cig6_r))
END GPL.
Thanks, Gene Maguin