Graph Templates

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

Graph Templates

Atai Winkler

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

 

Warnings

An inline graph specification was expected but not found.

Execution of this command stops.

 

 

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
PAM Analytics

 

[hidden email]

Skype: ataiwinkler

 

www.pamanalytics.com

 

 

 

===================== 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: Graph Templates

bdates
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

 

Warnings

An inline graph specification was expected but not found.

Execution of this command stops.

 

 

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
PAM Analytics

 

[hidden email]

Skype: ataiwinkler

 

www.pamanalytics.com

 

 

 

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

Re: Graph Templates

Atai Winkler

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]>
Sent: 07 December 2019 16:41
To: [hidden email]; Atai Winkler <[hidden email]>
Subject: Re: Graph Templates

 

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

 

Warnings

An inline graph specification was expected but not found.

Execution of this command stops.

 

 

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
PAM Analytics

 

[hidden email]

Skype: ataiwinkler

 

www.pamanalytics.com

 

 

 

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

Re: Graph Templates

Jon Peck
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:

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]>
Sent: 07 December 2019 16:41
To: [hidden email]; Atai Winkler <[hidden email]>
Subject: Re: Graph Templates

 

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

 

Warnings

An inline graph specification was expected but not found.

Execution of this command stops.

 

 

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
PAM Analytics

 

[hidden email]

Skype: ataiwinkler

 

www.pamanalytics.com

 

 

 

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


--
Jon K Peck
[hidden email]

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