SPSS 16 and chart builder templates

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPSS 16 and chart builder templates

Luca Meyer-3
Hi,

I am trying to get some chart templates to work within SPSS 16 but I am
probably doing something wrong.

First of all I used the following test data:

DATA LIST /NRCASES (F3) LABEL (A10).
BEGIN DATA
100 Product1
200 Product2
200 Product3
END DATA.

Then I built a chart using the wizard and I get the following syntax:

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=LABEL
SUM(NRCASES)[name="SUM_NRCASES" LEVEL=SCALE]
    MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: LABEL=col(source(s), name("LABEL"), unit.category())
  DATA: SUM_NRCASES=col(source(s), name("SUM_NRCASES"))
  COORD: polar.theta(startAngle(0))
  GUIDE: axis(dim(1), null())
  GUIDE: legend(aesthetic(aesthetic.color.interior), label("LABEL"))
  SCALE: linear(dim(1), dataMinimum(), dataMaximum())
  ELEMENT: interval.stack(position(summary.percent(SUM_NRCASES))),
color.interior(LABEL))
END GPL.

Afterwards, I use the chart editors to add labels and remove legend from the
pie I created so that I get the following chart:

HYPERLINK
"http://www.lucameyer.com/testchart.htm"http://www.lucameyer.com/testchart.h
tm

The .sgt (template) file I have saved is avaible here:

HYPERLINK
"http://www.lucameyer.com/testchart.htm"http://www.lucameyer.com/testchart.h
tm (locally on my pc is saved into c:\temp\)

Now, I expect that when I run the syntax on the same dataset:

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=LABEL
SUM(NRCASES)[name="SUM_NRCASES" LEVEL=SCALE]
    MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE TEMPLATE=["C:\temp\TEST.sgt"].
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: LABEL=col(source(s), name("LABEL"), unit.category())
  DATA: SUM_NRCASES=col(source(s), name("SUM_NRCASES"))
  COORD: polar.theta(startAngle(0))
  GUIDE: axis(dim(1), null())
  GUIDE: legend(aesthetic(aesthetic.color.interior), label("LABEL"))
  SCALE: linear(dim(1), dataMinimum(), dataMaximum())
  ELEMENT: interval.stack(position(summary.percent(SUM_NRCASES))),
color.interior(LABEL))
END GPL.

I should obtain the exact same graph. Instead I get:

HYPERLINK
"http://www.lucameyer.com/testchart1.htm"http://www.lucameyer.com/testchart1
.htm

That is, the labels come out modified. Can anyone explain why is this
occuring? Please notice that while saving the .sgt file when I was prompted
the settings I wanted to save I checked "all settings" so I should get also
this feature in the template.

Thanks,
Luca

Mr. Luca MEYER
Market research, data analysis & more
HYPERLINK "http://www.lucameyer.com/"www.lucameyer.com - Tel:
+39.339.495.00.21






No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.17/1252 - Release Date: 30/01/2008
20.51

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