ggraph contral scale

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ggraph contral scale

Jodene Fine
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
[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
Reply | Threaded
Open this post in threaded view
|

Re: ggraph contral scale

ViAnn Beadle
Specify the min and max functions on the SCALE statements for your
dimensions.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Jodene Fine
Sent: Monday, January 03, 2011 9:53 AM
To: [hidden email]
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
[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

=====================
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