Date: Mon, 3 Jan 2011 11:53:22 -0500
Reply-To: Jodene Fine <finej@MSU.EDU>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jodene Fine <finej@MSU.EDU>
Subject: ggraph contral scale
Happy New Year SPSSxers!
I am converting some old igraph code to work with ggraph gpl. In igraph, I
was able to control the scale and axes lengths with the following for a
categorical color scatterplot:
igraph
/y=var(zcord) type=scale(min=60 max=110)
/x1=var(ycord) type=scale(min=50 max = 150)
/ylength = 2
/xlength = 4
/color = var(segno) type = categorical
/scatter.
In ggraph, I have been unable to figure out how to control the scales and
axes in this way. My current code for the ggraph statement is as follows.
GGRAPH
/GRAPHDATASET NAME="graphdataset" VARIABLES=xcord ycord
segno[LEVEL=NOMINAL] MISSING=LISTWISE
REPORTMISSING=NO
/GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=userSource(id("graphdataset"))
DATA: xcord=col(source(s), name("xcord"))
DATA: ycord=col(source(s), name("ycord"))
DATA: segno=col(source(s), name("segno"), unit.category())
GUIDE: axis(dim(1), label("x coordinate"), delta(10))
GUIDE: axis(dim(2), label("y coordinate"), delta(10))
GUIDE: legend(aesthetic(aesthetic.color.exterior), label("segno"))
ELEMENT: point(position(xcord*ycord), color.exterior(segno))
END GPL.
Many thanks for your kind attention.
Best regards to you all.
Jodene
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|