|Date: ||Thu, 17 Mar 2011 08:41:00 -0700|
|Reply-To: ||BBH123 <firstname.lastname@example.org>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||BBH123 <email@example.com>|
|Subject: ||Using Graph Templates|
|Content-Type: ||text/plain; charset=us-ascii|
I'm including a graph in my macro on spss, and from the information I have
found in this discussion and from my own experience, you cannot just use the
usual graph syntax in a macro as it keeps running 'INLINE' forever!
I think that using a graph template should get around that - my predecessor
seemed to be using that with no problem anyway, but unfortunately I just
can't get my template to work - I think my syntax is incorrect. My syntax
for my original graph is:
* Chart Builder.
/GRAPHDATASET NAME="graphdataset" VARIABLES=ses_ayrc COUNT()[name="COUNT"]
Modeofattendance MISSING=LISTWISE REPORTMISSING=NO
DATA: ses_ayrc=col(source(s), name("ses_ayrc"), unit.category())
DATA: COUNT=col(source(s), name("COUNT"))
DATA: Modeofattendance=col(source(s), name("Modeofattendance"),
GUIDE: axis(dim(1), label("Academic Year"))
GUIDE: axis(dim(2), label("Number of Students"))
GUIDE: legend(aesthetic(aesthetic.shape.interior), label("Mode of
GUIDE: text.title(label("Student Numbers"))
SCALE: linear(dim(2), include(0))
ELEMENT: line(position(ses_ayrc*COUNT), shape.interior(Modeofattendance),
And then I saved the outputted chart as a .sgt template. When I tried to
then use this template I used the following syntax:
/LINE(MULTIPLE) COUNT(ses_ayrc) BY ses_ayrc BY Modeofattendance
Which I'm sure is totally wrong as I get three error messages:
>Error # 701 in column 18. Text: COUNT
>An undefined variable name, or a scratch or system variable was specified
>variable list which accepts only standard variables. Check spelling and
>verify the existence of this variable.
>Execution of this command stops.
>Warning # 17849
>The requested line chart type cannot be drawn with the provided data.
>Instead, Graphics will attempt to draw a simple line chart.
>Error # 17819 in column 23. Text: (
>Expected "/" was not found. Perhaps either the "/" between subcommands was
>omitted, or if a chart type was specified, the variable specifications are
>invalid for the requested chart. Skipping to a "/".
I'm sure the first line is wrong, but I can't work out how to word it as it
seems totally different when using templates?
Any help would be greatly appreciated!
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Using-Graph-Templates-tp3884884p3884884.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
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
For a list of commands to manage subscriptions, send the command