This GPL wiill produce the scatterplot with a fit line at total,
assuming you have SPSS 14 (or higher):
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=Nresp Overall_Rating CID
MISSING=LISTWISE REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: Nresp=col(source(s), name("Nresp"))
DATA: Overall_Rating=col(source(s), name("Overall_Rating"))
DATA: CID=col(source(s), name("CID"), unit.category())
GUIDE: axis(dim(1), label("Nresp Label"))
GUIDE: axis(dim(2), label("Overall_Rating Label"))
GUIDE: legend(aesthetic(aesthetic.color.exterior), label("CID"))
SCALE: cat(aesthetic(aesthetic.color.exterior))
ELEMENT: point(position(Nresp*Overall_Rating), color.exterior(CID))
ELEMENT: line(position(smooth.linear(Nresp*Overall_Rating)))
END GPL.
HTH,
Jason
On 10/21/06, Gene Maguin <
[hidden email]> wrote:
> Brian,
>
> No. You have to use Igraph. An example follows. Note the 'Fitline Method ...
> Subcommand. No doubt you can use GPL; I haven't.
>
> IGRAPH /VIEWNAME='Scatterplot'/X1=VAR(P1CTSM2) TYPE=SCALE/
> Y = VAR(PRP2CTSM2) TYPE=SCALE /STYLE=VAR(GROUP)/
> COORDINATE=VERTICAL/
> FITLINE METHOD=REGRESSION LINEAR LINE=MEFFECT SPIKE=OFF/
> X1LENGTH=3.0/YLENGTH=3.0/X2LENGTH=3.0/CHARTLOOK='NONE'/
> CATORDER VAR(GROUP) (ASCENDING VALUES OMITEMPTY)/
> SCATTER COINCIDENT=NONE.
>
>
> Gene Maguin
>