Hi I wonder if somebody can help me. I need to create bar charts and scatter graphs, and am using templates to minimise the amount of editing I have to do on the graphs. I created a template for the bar charts and inserted it into the program as shown below. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=manu_grp VALIDN(no_intvns_manu_grp)[name="VALIDN_no_intvns_manu_grp"] work_type MISSING=LISTWISE
REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE TEMPLATE='chart_templates\bar charts template.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: manu_grp=col(source(s), name("manu_grp"), unit.category()) etc. This works perfectly. I then created a template for the scatter graphs and inserted it in the same way in the program * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=no_pumps_site no_intvns_asset_pumps_site
MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE /FITLINE TOTAL=NO. /TEMPLATE='chart_templates\scatter graphs template 1.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: no_pumps_site=col(source(s), name("no_pumps_site")) I get the following messages
Error # 99. Command name: BEGIN GPL This command is only valid immediately following the GGRAPH procedure. Execution of this command stops. Why do I get these messages and what am I doing wrong for scatter graphs? Thank you for your help. Atai Dr Atai Winkler Principal Consultant Skype: ataiwinkler |
Try removing the period after /FITLINE TOTAL=NO
.
Try adding your 'TEMPLATE= line' without the
forward slash, as you did in the first example for the bar graphs.
Brian
From: SPSSX(r) Discussion <[hidden email]> on behalf of Atai Winkler <[hidden email]>
Sent: Saturday, December 7, 2019 11:11 AM To: [hidden email] <[hidden email]> Subject: Graph Templates Hi
I wonder if somebody can help me. I need to create bar charts and scatter graphs, and am using templates to minimise the amount of editing I have to do on the graphs.
I created a template for the bar charts and inserted it into the program as shown below.
* Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=manu_grp VALIDN(no_intvns_manu_grp)[name="VALIDN_no_intvns_manu_grp"] work_type MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE TEMPLATE='chart_templates\bar charts template.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: manu_grp=col(source(s), name("manu_grp"), unit.category()) etc.
This works perfectly.
I then created a template for the scatter graphs and inserted it in the same way in the program
* Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=no_pumps_site no_intvns_asset_pumps_site MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE /FITLINE TOTAL=NO. /TEMPLATE='chart_templates\scatter graphs template 1.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: no_pumps_site=col(source(s), name("no_pumps_site"))
I get the following messages
Error # 99. Command name: BEGIN GPL This command is only valid immediately following the GGRAPH procedure. Execution of this command stops.
Why do I get these messages and what am I doing wrong for scatter graphs?
Thank you for your help.
Atai
Dr Atai Winkler Principal Consultant
Skype: ataiwinkler
|
Thank you Brian. Sorry bit I do not quite understand your suggestion. The syntax is * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=no_pumps_site no_intvns_asset_pumps_site
MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE /FITLINE TOTAL=NO /TEMPLATE='chart_templates\scatter graphs template 1.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: no_pumps_site=col(source(s), name("no_pumps_site")) DATA: no_intvns_asset_pumps_site=col(source(s), name("no_intvns_asset_pumps_site")) GUIDE: axis(dim(1), label("No. pumps at site")) GUIDE: axis(dim(2), label("Mean no. interventions per pump")) ELEMENT: point(position(no_pumps_site*no_intvns_asset_pumps_site)) END GPL. Atai From: Dates, Brian <[hidden email]>
Try removing the period after /FITLINE TOTAL=NO . Try adding your 'TEMPLATE= line' without the forward slash, as you did in the first example for the bar graphs. Brian From: SPSSX(r) Discussion <[hidden email]> on behalf of Atai Winkler <[hidden email]> Hi I wonder if somebody can help me. I need to create bar charts and scatter graphs, and am using templates to minimise the amount of editing I have to do on the graphs. I created a template for the bar charts and inserted it into the program as shown below. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=manu_grp VALIDN(no_intvns_manu_grp)[name="VALIDN_no_intvns_manu_grp"] work_type MISSING=LISTWISE
REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE TEMPLATE='chart_templates\bar charts template.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: manu_grp=col(source(s), name("manu_grp"), unit.category()) etc. This works perfectly. I then created a template for the scatter graphs and inserted it in the same way in the program * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=no_pumps_site no_intvns_asset_pumps_site
MISSING=LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE /FITLINE TOTAL=NO. /TEMPLATE='chart_templates\scatter graphs template 1.sgt'. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: no_pumps_site=col(source(s), name("no_pumps_site")) I get the following messages
Error # 99. Command name: BEGIN GPL This command is only valid immediately following the GGRAPH procedure. Execution of this command stops. Why do I get these messages and what am I doing wrong for scatter graphs? Thank you for your help. Atai Dr Atai Winkler Principal Consultant Skype: ataiwinkler ===================== 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
|
TEMPLATE is a keyword on the GRAPHSPEC subcommand, not its own subcommand. So move the TEMPLATE spec up to GRAPHSPEC without the /. Also, FITLINE should be FITLINES. On Sat, Dec 7, 2019 at 9:44 AM Atai Winkler <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |