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
|
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:
|
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
From: [hidden email]
Sent: Tuesday, October 14, 2014 5:56 PM
To: [hidden email]
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:
No virus found in this
message. |
Free forum by Nabble | Edit this page |