Chart Builder

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

Chart Builder

Atai Winkler-2
Hi all
 
 
I wander if any body can help me on the syntax for the Chart Builder.
 
I have a scatter graph with observations from five distinct values of a third variable (so that there is one set of points for each value of this variable). I have used a template file in the syntax file to define the axes and so now I would like to enhance the template file or syntax file to specify the shape, fill, colour and size of the points. All the points are to have the same shape, fill and size, and the points are to differ by colour, a different colour for each of the value of the third variable.
 
The syntax is:
 
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=pcent_proact_non_term_events total_maint_cost
    risk_tolerance MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE
  TEMPLATE='graph_template\simulation graphs template.sgt'.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: pcent_proact_non_term_events=col(source(s), name("pcent_proact_non_term_events"))
  DATA: total_maint_cost=col(source(s), name("total_maint_cost"))
  DATA: risk_tolerance=col(source(s), name("risk_tolerance"), unit.category())
  GUIDE: axis(dim(1), label("Percent proactive interventions"))
  GUIDE: axis(dim(2), label("Maintenance cost (£ million)"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Risk tolerance"))
  ELEMENT: point(position(pcent_proact_non_term_events*total_maint_cost),
    color.exterior(risk_tolerance))
END GPL.
 
 
Thank you
 
 
Atai
 
 
 
===================== 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: Chart Builder

Jignesh Sutar
From GUI, if you go to Chart Builder -- >Scatter Dot --> Grouped Scatter --> input your third variable (the one with 5 categories/distinctive values, if I have understood correctly) in the "Set color" box that should then give you an x by y scatter plot with points distinguished differently for the groupings of your third variable. 

Cheers
Jignesh



On 14 October 2014 17:08, Atai Winkler <[hidden email]> wrote:
Hi all
 
 
I wander if any body can help me on the syntax for the Chart Builder.
 
I have a scatter graph with observations from five distinct values of a third variable (so that there is one set of points for each value of this variable). I have used a template file in the syntax file to define the axes and so now I would like to enhance the template file or syntax file to specify the shape, fill, colour and size of the points. All the points are to have the same shape, fill and size, and the points are to differ by colour, a different colour for each of the value of the third variable.
 
The syntax is:
 
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=pcent_proact_non_term_events total_maint_cost
    risk_tolerance MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE
  TEMPLATE='graph_template\simulation graphs template.sgt'.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: pcent_proact_non_term_events=col(source(s), name("pcent_proact_non_term_events"))
  DATA: total_maint_cost=col(source(s), name("total_maint_cost"))
  DATA: risk_tolerance=col(source(s), name("risk_tolerance"), unit.category())
  GUIDE: axis(dim(1), label("Percent proactive interventions"))
  GUIDE: axis(dim(2), label("Maintenance cost (£ million)"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Risk tolerance"))
  ELEMENT: point(position(pcent_proact_non_term_events*total_maint_cost),
    color.exterior(risk_tolerance))
END GPL.
 
 
Thank you
 
 
Atai
 
 
 
===================== 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: Chart Builder

Atai Winkler-2
Thank you Jignesh.
 
Yes, you have understood me correctly and I have done what you suggest. My question related to the syntax to change the way the third variable is presented (I have many such graphs and so the syntax would be very useful).
 
 
Atai
 
 
 
Sent: Tuesday, October 14, 2014 5:56 PM
Subject: Re: Chart Builder
 
From GUI, if you go to Chart Builder -- >Scatter Dot --> Grouped Scatter --> input your third variable (the one with 5 categories/distinctive values, if I have understood correctly) in the "Set color" box that should then give you an x by y scatter plot with points distinguished differently for the groupings of your third variable. 
 
Cheers
Jignesh
 
 
 
On 14 October 2014 17:08, Atai Winkler <[hidden email]> wrote:
Hi all
 
 
I wander if any body can help me on the syntax for the Chart Builder.
 
I have a scatter graph with observations from five distinct values of a third variable (so that there is one set of points for each value of this variable). I have used a template file in the syntax file to define the axes and so now I would like to enhance the template file or syntax file to specify the shape, fill, colour and size of the points. All the points are to have the same shape, fill and size, and the points are to differ by colour, a different colour for each of the value of the third variable.
 
The syntax is:
 
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=pcent_proact_non_term_events total_maint_cost
    risk_tolerance MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE
  TEMPLATE='graph_template\simulation graphs template.sgt'.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: pcent_proact_non_term_events=col(source(s), name("pcent_proact_non_term_events"))
  DATA: total_maint_cost=col(source(s), name("total_maint_cost"))
  DATA: risk_tolerance=col(source(s), name("risk_tolerance"), unit.category())
  GUIDE: axis(dim(1), label("Percent proactive interventions"))
  GUIDE: axis(dim(2), label("Maintenance cost (£ million)"))
  GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Risk tolerance"))
  ELEMENT: point(position(pcent_proact_non_term_events*total_maint_cost),
    color.exterior(risk_tolerance))
END GPL.
 
 
Thank you
 
 
Atai
 
 
 
===================== 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

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4765 / Virus Database: 4040/8385 - Release Date: 10/14/14

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