how to pass arguments to a GGRAPH GPL procedure?

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

how to pass arguments to a GGRAPH GPL procedure?

Zuluaga, Juan
Hello SPSS people,
I'm trying a generate a bunch of graphs, and add a horizontal line to them, at a height set by value of variable NationalNormingReading9, with the line
GUIDE: form.line(position(*,NationalNormingReading9), color(color.green))
in the GPL code.
I've defined the value of NationalNormingReading9 before.
How do I pass that value to the GPL procedure?

If I do

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=Student AccessLevel GainInReading
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: AccessLevel=col(source(s), name("AccessLevel"),unit.category())
  DATA: GainInReading=col(source(s), name("GainInReading"))
  DATA: Student=col(source(s),name("Student"),unit.category())
  GUIDE: axis(dim(1), label("Access Level"))
  GUIDE: axis(dim(2), label("Gain in MAP Reading Scores"))
  GUIDE: form.line(position(*,NationalNormingReading9), color(color.green))
  SCALE: linear(dim(2))
  ELEMENT: schema(position(bin.quantile.letter(AccessLevel*GainInReading)),label(Student))
END GPL.

I get an error message saying
GPL error: positionConstant(*,NationalNormingMath9)
Not a quoted string: NationalNormingMath9\n\GPL:\n Source(id("graphdataset"))

I run SPSS v.17.

Thanks!

-j

=====================
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: how to pass arguments to a GGRAPH GPL procedure?

ViAnn Beadle
The form.line GUIDE only takes values and *. You could create a little
python program to pass the value of NationalNormingReading9 or you could
just add a line element to the GPL to draw the line such as
ELEMENT: line(position(AccessLevel*NationalNormingReading9))


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Zuluaga, Juan
Sent: Tuesday, May 10, 2011 10:14 AM
To: [hidden email]
Subject: how to pass arguments to a GGRAPH GPL procedure?

Hello SPSS people,
I'm trying a generate a bunch of graphs, and add a horizontal line to them,
at a height set by value of variable NationalNormingReading9, with the line
GUIDE: form.line(position(*,NationalNormingReading9), color(color.green)) in
the GPL code.
I've defined the value of NationalNormingReading9 before.
How do I pass that value to the GPL procedure?

If I do

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=Student AccessLevel
GainInReading
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: AccessLevel=col(source(s), name("AccessLevel"),unit.category())
  DATA: GainInReading=col(source(s), name("GainInReading"))
  DATA: Student=col(source(s),name("Student"),unit.category())
  GUIDE: axis(dim(1), label("Access Level"))
  GUIDE: axis(dim(2), label("Gain in MAP Reading Scores"))
  GUIDE: form.line(position(*,NationalNormingReading9), color(color.green))
  SCALE: linear(dim(2))
  ELEMENT:
schema(position(bin.quantile.letter(AccessLevel*GainInReading)),label(Studen
t))
END GPL.

I get an error message saying
GPL error: positionConstant(*,NationalNormingMath9)
Not a quoted string: NationalNormingMath9\n\GPL:\n
Source(id("graphdataset"))

I run SPSS v.17.

Thanks!

-j

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