Shalom
I am struggling to create the flowing graph using GPL .
What i need is a line graph with 3 summary line (each for a deferent
variable) and repeat that for 2 value of religion ( one graph for
each value of religion ).
I tired 2 approach .
1. using 3 elements .
ELEMENT: line(position(summary.mean(month*n )) ,shape.interior(
shape.solid ) , color.interior(color.red))
ELEMENT: line(position(summary.mean(month*p1))
,shape.interior(shape.dash ) , color.interior(color.lime))
ELEMENT: line(position(summary.mean(month*p2))
,shape.interior(shape.dash_1_dot ), color.interior(color.darkblue ))
for that graph i don't know how to add the "legend Guide " witch
usually is added as a color when there is only one elements .
2. Transforming the 3 variables .
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES= month MEAN(n) MEAN(p1)
MEAN(p2) relig
TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables")
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: month = col(source(s), name("month"))
DATA: variables = col(source(s), name("variables"), unit.category())
DATA: meansal = col(source(s), name("meansal"))
GUIDE: axis(dim(1), label("months"))
GUIDE: axis(dim(2), label(" means "))
ELEMENT:
line(position(month*meansal*variables)),color.interior(variables))
END GPL.
Here I get the "legend Guide" OK but the result was3 graph each for one
variable of the color ( n p1 and p2 )
for both approach I can use split files to get the 2 religion graphs but
I prefer to get it using the GPL witch give more flexibly for title and
comments .
Hillel Vardi
BGU
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD