LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2011)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 17 Mar 2011 08:41:00 -0700
Reply-To:   BBH123 <bethanyhumphreys@gmail.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   BBH123 <bethanyhumphreys@gmail.com>
Subject:   Using Graph Templates
Content-Type:   text/plain; charset=us-ascii

Hi,

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. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=ses_ayrc COUNT()[name="COUNT"] Modeofattendance MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) 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"), unit.category()) GUIDE: axis(dim(1), label("Academic Year")) GUIDE: axis(dim(2), label("Number of Students")) GUIDE: legend(aesthetic(aesthetic.shape.interior), label("Mode of Attendance")) GUIDE: text.title(label("Student Numbers")) SCALE: linear(dim(2), include(0)) ELEMENT: line(position(ses_ayrc*COUNT), shape.interior(Modeofattendance), missing.wings()) END GPL.

And then I saved the outputted chart as a .sgt template. When I tried to then use this template I used the following syntax:

GRAPH /LINE(MULTIPLE) COUNT(ses_ayrc) BY ses_ayrc BY Modeofattendance /TEMPLATE='...filepathway...\Student Numbers.sgt'

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 in a >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!

Many thanks

-- 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 SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


Back to: Top of message | Previous page | Main SPSSX-L page